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 25
25
parser .add_argument ("sigma" , type = float )
26
26
args = parser .parse_args ()
27
27
28
- PixelType = itk .UC
29
- Dimension = 2
28
+ image = itk .imread (args .input_image )
30
29
31
- ImageType = itk .Image [ PixelType , Dimension ]
30
+ smooth_image = itk .discrete_gaussian_image_filter ( image , sigma = args . sigma )
32
31
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