#include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkSignedMaurerParallelDistanceMapImageFilter.h" int main( int argc, char * argv[]) { const unsigned int ImageDimension = 2; typedef unsigned int InputPixelType; typedef double OutputPixelType; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageFileWriter WriterType; typedef InputImageType::SizeType InputSizeType; ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName(argv[1]); reader->Update(); typedef itk::SignedMaurerParallelDistanceMapImageFilter ParallelMaurerType; ParallelMaurerType::Pointer parallelMaurer = ParallelMaurerType::New(); parallelMaurer->SetInput(reader->GetOutput()); parallelMaurer->SetSquaredDistance(0); parallelMaurer->SetUseImageSpacing(1); parallelMaurer->SetInsideIsPositive(0); parallelMaurer->SetBinaryConvert(1); parallelMaurer->SetForegroundValue(1); parallelMaurer->SetSigned(1); parallelMaurer->Update(); writer->SetInput(parallelMaurer->GetOutput()); writer->SetFileName(argv[2]); writer->Update(); return 0; };