@@ -116,7 +116,6 @@ class ITK_TEMPLATE_EXPORT RunLengthTextureFeaturesImageFilter
116116 typedef TInputImage InputImageType;
117117 typedef TOutputImage OutputImageType;
118118 typedef TMaskImage MaskImageType;
119- typedef TInputImage DigitizedImageType;
120119
121120 typedef typename InputImageType::PixelType PixelType;
122121 typedef typename MaskImageType::PixelType MaskPixelType;
@@ -131,9 +130,7 @@ class ITK_TEMPLATE_EXPORT RunLengthTextureFeaturesImageFilter
131130 typedef typename InputImageType::RegionType InputRegionType;
132131 typedef typename OutputImageType::RegionType OutputRegionType;
133132
134- typedef typename itk::ConstNeighborhoodIterator< InputImageType > NeighborhoodIteratorType;
135- typedef typename NeighborhoodIteratorType::RadiusType NeighborhoodRadiusType;
136- typedef typename NeighborhoodIteratorType::NeighborIndexType NeighborIndexType;
133+ typedef typename itk::ConstNeighborhoodIterator< InputImageType >::RadiusType NeighborhoodRadiusType;
137134
138135 typedef typename NumericTraits<PixelType>::RealType MeasurementType;
139136 typedef typename NumericTraits<PixelType>::RealType RealType;
@@ -222,22 +219,25 @@ class ITK_TEMPLATE_EXPORT RunLengthTextureFeaturesImageFilter
222219
223220#ifdef ITK_USE_CONCEPT_CHECKING
224221 // Begin concept checking
225- itkConceptMacro ( InputPixelTypeCheck,
226- ( Concept::IsInteger< typename InputImageType::PixelType>) );
227222 itkConceptMacro ( OutputPixelTypeCheck,
228223 ( Concept::IsFloatingPoint< OutputRealType > ) );
229224 // End concept checking
230225#endif
231226
232227protected:
233228
229+ typedef int HistogramIndexType;
230+ typedef itk::Image< HistogramIndexType, TInputImage::ImageDimension > DigitizedImageType;
231+ typedef typename itk::ConstNeighborhoodIterator< DigitizedImageType > NeighborhoodIteratorType;
232+ typedef typename NeighborhoodIteratorType::NeighborIndexType NeighborIndexType;
233+
234234 RunLengthTextureFeaturesImageFilter ();
235235 virtual ~RunLengthTextureFeaturesImageFilter () {}
236236
237237 void NormalizeOffsetDirection (OffsetType &offset);
238238 bool IsInsideNeighborhood (const OffsetType &iteratedOffset);
239239 void IncreaseHistogram (vnl_matrix<unsigned int > &hist, unsigned int &totalNumberOfRuns,
240- const PixelType ¤tInNeighborhoodPixelIntensity,
240+ const HistogramIndexType ¤tInNeighborhoodPixelIntensity,
241241 const OffsetType &offset, const unsigned int &pixelDistance);
242242 void ComputeFeatures ( vnl_matrix<unsigned int > &hist, const unsigned int &totalNumberOfRuns,
243243 typename TOutputImage::PixelType &outputPixel);
@@ -251,16 +251,16 @@ class ITK_TEMPLATE_EXPORT RunLengthTextureFeaturesImageFilter
251251 virtual void GenerateOutputInformation () ITK_OVERRIDE;
252252
253253private:
254- typename InputImageType ::Pointer m_DigitizedInputImage;
255- NeighborhoodRadiusType m_NeighborhoodRadius;
256- OffsetVectorPointer m_Offsets;
257- unsigned int m_NumberOfBinsPerAxis;
258- PixelType m_HistogramValueMinimum;
259- PixelType m_HistogramValueMaximum;
260- RealType m_HistogramDistanceMinimum;
261- RealType m_HistogramDistanceMaximum;
262- MaskPixelType m_InsidePixelValue;
263- typename TInputImage::SpacingType m_Spacing;
254+ typename DigitizedImageType ::Pointer m_DigitizedInputImage;
255+ NeighborhoodRadiusType m_NeighborhoodRadius;
256+ OffsetVectorPointer m_Offsets;
257+ unsigned int m_NumberOfBinsPerAxis;
258+ PixelType m_HistogramValueMinimum;
259+ PixelType m_HistogramValueMaximum;
260+ RealType m_HistogramDistanceMinimum;
261+ RealType m_HistogramDistanceMaximum;
262+ MaskPixelType m_InsidePixelValue;
263+ typename TInputImage::SpacingType m_Spacing;
264264};
265265} // end of namespace Statistics
266266} // end of namespace itk
0 commit comments