Skip to content

Commit

Permalink
Merge pull request #1757 from ANTsX/ListSampleFunc
Browse files Browse the repository at this point in the history
BUG:  Resolve Manifold parzen windows seg fault
  • Loading branch information
cookpa authored Jun 12, 2024
2 parents ca4af10 + 315a231 commit 29e8580
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ImageSegmentation/antsAtroposSegmentationImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ AtroposSegmentationImageFilter<TInputImage, TMaskImage, TClassifiedImage>::Gener
{
this->m_MixtureModelComponents[n]->SetListSampleWeights(&weights[n]);
this->m_MixtureModelComponents[n]->SetInputListSample(samples[n]);
this->m_MixtureModelComponents[n]->ClearInputListSample();
// this->m_MixtureModelComponents[n]->ClearInputListSample();

if (this->m_UseMixtureModelProportions)
{
Expand All @@ -635,7 +635,7 @@ AtroposSegmentationImageFilter<TInputImage, TMaskImage, TClassifiedImage>::Gener
{
this->m_MixtureModelComponents[n]->SetListSampleWeights(d, &weights[labelSet[d] - 1]);
this->m_MixtureModelComponents[n]->SetIndexedInputListSample(d, samples[labelSet[d] - 1]);
this->m_MixtureModelComponents[n]->ClearInputListSample(d);
// this->m_MixtureModelComponents[n]->ClearInputListSample(d);
}

this->m_MixtureModelProportions[n] = 0.0;
Expand Down Expand Up @@ -1279,7 +1279,7 @@ AtroposSegmentationImageFilter<TInputImage, TMaskImage, TClassifiedImage>::Updat
{
this->m_MixtureModelComponents[n]->SetListSampleWeights(&weights);
this->m_MixtureModelComponents[n]->SetInputListSample(sample);
this->m_MixtureModelComponents[n]->ClearInputListSample();
// this->m_MixtureModelComponents[n]->ClearInputListSample();
}
else
{
Expand All @@ -1290,7 +1290,7 @@ AtroposSegmentationImageFilter<TInputImage, TMaskImage, TClassifiedImage>::Updat
{
this->m_MixtureModelComponents[n]->SetListSampleWeights(d, &weights);
this->m_MixtureModelComponents[n]->SetIndexedInputListSample(d, sample);
this->m_MixtureModelComponents[n]->ClearInputListSample(d);
// this->m_MixtureModelComponents[n]->ClearInputListSample(d);
}
}
this->m_MixtureModelProportions[n] = 0.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ ManifoldParzenWindowsListSampleFunction<TListSample, TOutput, TCoordRep>::Evalua
}
else
{
typename TreeGeneratorType::KdTreeType ::InstanceIdentifierVectorType neighbors;
typename TreeGeneratorType::KdTreeType::InstanceIdentifierVectorType neighbors;
this->m_KdTreeGenerator->GetOutput()->Search(measurement, numberOfNeighbors, neighbors);
for (unsigned int j = 0; j < numberOfNeighbors; j++)
{
Expand Down

0 comments on commit 29e8580

Please sign in to comment.