19 #include <itkImageFileReader.h> 20 #include <itkImageFileWriter.h> 22 #include <itkPSMImplicitSurfaceImageFilter.h> 24 int main_ (
int argc,
char *argv[])
28 std::cout <<
"Usage:" << argv[0]
29 <<
"output_prefix smoothing_sigma isosurface_value input_file_1 input_file_2 ..." << std::endl;
34 double isosurface_value = 0.5;
36 { sigma = atof(argv[3]); }
38 { isosurface_value = atof(argv[4]); }
41 typedef itk::Image<float, 3> image_type;
50 std::cout <<
"Reading " << argv[4] << std::endl;
51 itk::ImageFileReader<image_type>::Pointer reader
52 = itk::ImageFileReader<image_type>::New();
53 reader->SetFileName(argv[4]);
56 itk::ImageFileWriter<image_type>::Pointer fwriter
57 = itk::ImageFileWriter<image_type>::New();
63 catch (itk::ExceptionObject &e)
65 std::cerr << e << std::endl;
70 std::cerr <<
"Unknown error" << std::endl;