File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
src/Filtering/Smoothing/SmoothImageWithDiscreteGaussianFilter Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change 2525parser .add_argument ("sigma" , type = float )
2626args = parser .parse_args ()
2727
28- PixelType = itk .UC
29- Dimension = 2
28+ image = itk .imread (args .input_image )
3029
31- ImageType = itk .Image [ PixelType , Dimension ]
30+ smooth_image = itk .discrete_gaussian_image_filter ( image , sigma = args . sigma )
3231
33- reader = itk .ImageFileReader [ImageType ].New ()
34- reader .SetFileName (args .input_image )
35-
36- smoother = itk .DiscreteGaussianImageFilter [ImageType , ImageType ].New ()
37- smoother .SetInput (reader .GetOutput ())
38- smoother .SetSigma (args .sigma )
39-
40- writer = itk .ImageFileWriter [ImageType ].New ()
41- writer .SetFileName (args .output_image )
42- writer .SetInput (smoother .GetOutput ())
43-
44- writer .Update ()
32+ itk .imwrite (smooth_image , args .output_image )
You can’t perform that action at this time.
0 commit comments