File tree Expand file tree Collapse file tree 2 files changed +36
-6
lines changed
Expand file tree Collapse file tree 2 files changed +36
-6
lines changed Original file line number Diff line number Diff line change 66 "<PixelValueMax> <NeighborhoodRadius>" )
77 sys .exit (1 )
88
9- im = itk .imread (sys .argv [1 ])
10- mask = itk .imread (sys .argv [2 ])
9+
10+ Dimension = 3
11+
12+ #Input scan reader
13+ InputPixelType = itk .ctype ('signed short' )
14+ InputImageType = itk .Image [InputPixelType , Dimension ]
15+ imReader = itk .ImageFileReader [InputImageType ].New ()
16+ imReader .SetFileName (sys .argv [1 ])
17+
18+ #Input mask reader
19+ MaskPixelType = itk .ctype ('unsigned char' )
20+ MaskImageType = itk .Image [MaskPixelType , Dimension ]
21+ maskReader = itk .ImageFileReader [MaskImageType ].New ()
22+ maskReader .SetFileName (sys .argv [2 ])
23+
24+ im = imReader .GetOutput ()
25+ mask = maskReader .GetOutput ()
1126
1227filtr = itk .CoocurrenceTextureFeaturesImageFilter .New (im )
1328filtr .SetMaskImage (mask )
Original file line number Diff line number Diff line change 77 "<DistanceValueMax> <NeighborhoodRadius>" )
88 sys .exit (1 )
99
10- im = itk .imread (sys .argv [1 ])
11- mask = itk .imread (sys .argv [2 ])
10+
11+ Dimension = 3
12+
13+ #Input scan reader
14+ InputPixelType = itk .ctype ('signed short' )
15+ InputImageType = itk .Image [InputPixelType , Dimension ]
16+ imReader = itk .ImageFileReader [InputImageType ].New ()
17+ imReader .SetFileName (sys .argv [1 ])
18+
19+ #Input mask reader
20+ MaskPixelType = itk .ctype ('unsigned char' )
21+ MaskImageType = itk .Image [MaskPixelType , Dimension ]
22+ maskReader = itk .ImageFileReader [MaskImageType ].New ()
23+ maskReader .SetFileName (sys .argv [2 ])
24+
25+ im = imReader .GetOutput ()
26+ mask = maskReader .GetOutput ()
1227
1328filtr = itk .RunLengthTextureFeaturesImageFilter .New (im )
1429filtr .SetMaskImage (mask )
1530filtr .SetNumberOfBinsPerAxis (int (sys .argv [3 ]))
16- filtr .SetSetHistogramValueMinimum (int (sys .argv [4 ]))
17- filtr .SetSetHistogramValueMaximum ( int (sys .argv [5 ]))
31+ filtr .SetHistogramValueMinimum (int (sys .argv [4 ]))
32+ filtr .SetHistogramValueMaximum ( int (sys .argv [5 ]))
1833filtr .SetHistogramDistanceMinimum (float (sys .argv [6 ]))
1934filtr .SetHistogramDistanceMaximum (float (sys .argv [7 ]))
2035filtr .SetNeighborhoodRadius ([int (sys .argv [8 ]),int (sys .argv [8 ]),int (sys .argv [8 ])])
You can’t perform that action at this time.
0 commit comments