[Insight-users] replace DanielssonDistanceMapImageFilter by SignedMaurerDistanceMapImageFilter fails

Oliver mail at oliwe.com
Thu Oct 10 09:17:57 EDT 2013


Hi Matt,

thanks.

Yes, the use of SetImportPointer was the problem.
I used SetImportPointer with other filters before and I was not running into
problems.

I added following lines to my code: 

typedef itk::ShiftScaleImageFilter< 
               OutputImageType, OutputImageType > RescaleFilterType;
RescaleFilterType::Pointer rescaler = RescaleFilterType::New();
rescaler->SetInput( distanceMapper->GetOutput() );
rescaler->GetOutput()->GetPixelContainer()->SetContainerManageMemory(false);
rescaler->GetOutput()->GetPixelContainer()->SetImportPointer(outputimage,totalNumberofPixels,false);
rescaler->Update();

SetImportPointer works correctly with ShiftScaleImageFilter.

I tested the performance of SignedMaurerDistanceMapImageFilter against
DanielssonDistanceMapImageFilter for one binary 3d dataset.

SignedMaurerDistanceMapImageFilter -> 3.3 seconds

DanielssonDistanceMapImageFilter -> 28.0 seconds

The troubleshooting was really worth it :-)

Oliver



--
View this message in context: http://itk-users.7.n7.nabble.com/replace-DanielssonDistanceMapImageFilter-by-SignedMaurerDistanceMapImageFilter-fails-tp32509p32524.html
Sent from the ITK - Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list