@@ -116,13 +116,15 @@ 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;
123122 typedef typename InputImageType::IndexType IndexType;
124123 typedef typename InputImageType::PointType PointType;
125124
125+ typedef int HistogramIndexType;
126+ typedef itk::Image< HistogramIndexType, TInputImage::ImageDimension > DigitizedImageType;
127+
126128 typedef typename InputImageType::OffsetType OffsetType;
127129 typedef VectorContainer< unsigned char , OffsetType > OffsetVector;
128130 typedef typename OffsetVector::Pointer OffsetVectorPointer;
@@ -131,9 +133,9 @@ class ITK_TEMPLATE_EXPORT RunLengthTextureFeaturesImageFilter
131133 typedef typename InputImageType::RegionType InputRegionType;
132134 typedef typename OutputImageType::RegionType OutputRegionType;
133135
134- typedef typename itk::ConstNeighborhoodIterator< InputImageType > NeighborhoodIteratorType;
135- typedef typename NeighborhoodIteratorType::RadiusType NeighborhoodRadiusType;
136- typedef typename NeighborhoodIteratorType::NeighborIndexType NeighborIndexType;
136+ typedef typename itk::ConstNeighborhoodIterator< DigitizedImageType > NeighborhoodIteratorType;
137+ typedef typename NeighborhoodIteratorType::RadiusType NeighborhoodRadiusType;
138+ typedef typename NeighborhoodIteratorType::NeighborIndexType NeighborIndexType;
137139
138140 typedef typename NumericTraits<PixelType>::RealType MeasurementType;
139141 typedef typename NumericTraits<PixelType>::RealType RealType;
@@ -222,8 +224,6 @@ class ITK_TEMPLATE_EXPORT RunLengthTextureFeaturesImageFilter
222224
223225#ifdef ITK_USE_CONCEPT_CHECKING
224226 // Begin concept checking
225- itkConceptMacro ( InputPixelTypeCheck,
226- ( Concept::IsInteger< typename InputImageType::PixelType>) );
227227 itkConceptMacro ( OutputPixelTypeCheck,
228228 ( Concept::IsFloatingPoint< OutputRealType > ) );
229229 // End concept checking
@@ -237,7 +237,7 @@ class ITK_TEMPLATE_EXPORT RunLengthTextureFeaturesImageFilter
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