23 from InsightToolkit
import *
28 readerInput = itkImageFileReaderUC2_New()
29 readerPrior = itkImageFileReaderUC2_New()
31 readerInput.SetFileName(argv[1])
32 readerPrior.SetFileName(argv[2])
37 filter = itkVoronoiSegmentationImageFilterUC2UC2UC2_New()
39 filter.SetInput(readerInput.GetOutput())
40 filter.TakeAPrior(readerPrior.GetOutput())
42 filter.SetMeanPercentError(eval(argv[4]))
43 filter.SetSTDPercentError(eval(argv[5]))
45 writer = itkImageFileWriterUC2_New()
46 writer.SetFileName(argv[3])
47 writer.SetInput(filter.GetOutput())