Medical Imaging Interaction Toolkit  2022.10.99-122321bb
Medical Imaging Interaction Toolkit
itkEnhancedScalarImageToSizeZoneMatrixFilter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 /*=========================================================================
14 *
15 * Copyright Insight Software Consortium
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * https://www.apache.org/licenses/LICENSE-2.0.txt
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 *=========================================================================*/
30 #ifndef __itkEnhancedScalarImageToSizeZoneMatrixFilter_h
31 #define __itkEnhancedScalarImageToSizeZoneMatrixFilter_h
32 
33 #include "itkImage.h"
34 #include "itkHistogram.h"
35 #include "itkNumericTraits.h"
36 #include "itkVectorContainer.h"
37 
38 namespace itk
39 {
40  namespace Statistics
41  {
115  template<typename TImageType, typename THistogramFrequencyContainer =
116  DenseFrequencyContainer2>
117  class EnhancedScalarImageToSizeZoneMatrixFilter : public ProcessObject
118  {
119  public:
122  typedef ProcessObject Superclass;
125 
127  itkTypeMacro( EnhancedScalarImageToSizeZoneMatrixFilter, ProcessObject );
128 
130  itkNewMacro( Self );
131 
132  typedef TImageType ImageType;
133  typedef typename ImageType::Pointer ImagePointer;
134  typedef typename ImageType::ConstPointer ImageConstPointer;
135  typedef typename ImageType::PixelType PixelType;
136  typedef typename ImageType::IndexType IndexType;
137  typedef typename ImageType::RegionType RegionType;
138  typedef typename ImageType::SizeType RadiusType;
139  typedef typename ImageType::OffsetType OffsetType;
140  typedef VectorContainer<unsigned char, OffsetType> OffsetVector;
141  typedef typename OffsetVector::Pointer OffsetVectorPointer;
142  typedef typename ImageType::PointType PointType;
143 
144  typedef typename NumericTraits<PixelType>::RealType MeasurementType;
145  typedef typename NumericTraits<PixelType>::RealType RealType;
146 
147  typedef Histogram<MeasurementType, THistogramFrequencyContainer>
149  typedef typename HistogramType::Pointer HistogramPointer;
150  typedef typename HistogramType::ConstPointer HistogramConstPointer;
151  typedef typename HistogramType::MeasurementVectorType MeasurementVectorType;
152 
154  itkStaticConstMacro( ImageDimension, unsigned int,
155  TImageType::ImageDimension );
156 
158  itkStaticConstMacro( DefaultBinsPerAxis, unsigned int, 256 );
159 
169  itkSetObjectMacro( Offsets, OffsetVector );
170 
180  void SetOffset( const OffsetType offset );
181 
186 
188  itkSetMacro( NumberOfBinsPerAxis, unsigned int );
189 
191  itkGetConstMacro( NumberOfBinsPerAxis, unsigned int );
192 
197  void SetPixelValueMinMax( PixelType min, PixelType max );
198 
200  itkGetConstMacro( Min, PixelType );
201 
203  itkGetConstMacro( Max, PixelType );
204 
209  void SetDistanceValueMinMax( RealType min, RealType max );
210 
214  itkGetConstMacro( MinDistance, RealType );
215 
219  itkGetConstMacro( MaxDistance, RealType );
220 
222  using Superclass::SetInput;
223  void SetInput( const ImageType *image );
224 
226  const ImageType * GetInput() const;
227 
229  void SetMaskImage( const ImageType *image );
230 
232  const ImageType * GetMaskImage() const;
233 
235  const HistogramType * GetOutput() const;
236 
241  itkSetMacro( InsidePixelValue, PixelType );
242  itkGetConstMacro( InsidePixelValue, PixelType );
243 
244  protected:
247  virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
248 
250  typedef DataObject::Pointer DataObjectPointer;
251 
252  typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
253  using Superclass::MakeOutput;
254  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx ) ITK_OVERRIDE;
255 
257  virtual void GenerateData() ITK_OVERRIDE;
258 
259  private:
260 
261  unsigned int m_NumberOfBinsPerAxis;
262  PixelType m_Min;
263  PixelType m_Max;
264  RealType m_MinDistance;
265  RealType m_MaxDistance;
266  PixelType m_InsidePixelValue;
267 
268  MeasurementVectorType m_LowerBound;
269  MeasurementVectorType m_UpperBound;
270  OffsetVectorPointer m_Offsets;
271  };
272  } // end of namespace Statistics
273 } // end of namespace itk
274 
275 #ifndef ITK_MANUAL_INSTANTIATION
276 #include "itkEnhancedScalarImageToSizeZoneMatrixFilter.hxx"
277 #endif
278 
279 #endif
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::ImageConstPointer
ImageType::ConstPointer ImageConstPointer
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:134
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::MakeOutput
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::GetMaskImage
const ImageType * GetMaskImage() const
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::DataObjectPointer
DataObject::Pointer DataObjectPointer
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:250
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:124
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::GetOutput
const HistogramType * GetOutput() const
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter
This class computes a run length matrix (histogram) from a given image and a mask image if provided....
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:117
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::OffsetVectorPointer
OffsetVector::Pointer OffsetVectorPointer
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:141
itk::SmartPointer< Self >
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::RealType
NumericTraits< PixelType >::RealType RealType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:145
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::Superclass
ProcessObject Superclass
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:122
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::PointType
ImageType::PointType PointType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:142
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::GetInput
const ImageType * GetInput() const
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::SetPixelValueMinMax
void SetPixelValueMinMax(PixelType min, PixelType max)
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::HistogramPointer
HistogramType::Pointer HistogramPointer
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:149
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::PixelType
ImageType::PixelType PixelType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:135
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::HistogramConstPointer
HistogramType::ConstPointer HistogramConstPointer
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:150
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::RadiusType
ImageType::SizeType RadiusType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:138
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::itkStaticConstMacro
itkStaticConstMacro(ImageDimension, unsigned int, TImageType::ImageDimension)
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::MeasurementType
NumericTraits< PixelType >::RealType MeasurementType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:144
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::OffsetVector
VectorContainer< unsigned char, OffsetType > OffsetVector
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:140
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::Pointer
SmartPointer< Self > Pointer
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:123
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::ImagePointer
ImageType::Pointer ImagePointer
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:133
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::RegionType
ImageType::RegionType RegionType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:137
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(Offsets, OffsetVector)
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::SetOffset
void SetOffset(const OffsetType offset)
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::SetInput
void SetInput(const ImageType *image)
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::HistogramType
Histogram< MeasurementType, THistogramFrequencyContainer > HistogramType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:148
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::IndexType
ImageType::IndexType IndexType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:136
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::ImageType
TImageType ImageType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:130
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::SetMaskImage
void SetMaskImage(const ImageType *image)
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::GenerateData
virtual void GenerateData() ITK_OVERRIDE
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::MeasurementVectorType
HistogramType::MeasurementVectorType MeasurementVectorType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:151
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::SetDistanceValueMinMax
void SetDistanceValueMinMax(RealType min, RealType max)
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::DataObjectPointerArraySizeType
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:252
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::Self
EnhancedScalarImageToSizeZoneMatrixFilter Self
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:121
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::EnhancedScalarImageToSizeZoneMatrixFilter
EnhancedScalarImageToSizeZoneMatrixFilter()
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::OffsetType
ImageType::OffsetType OffsetType
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:139
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::PrintSelf
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
itk::Statistics::EnhancedScalarImageToSizeZoneMatrixFilter::~EnhancedScalarImageToSizeZoneMatrixFilter
virtual ~EnhancedScalarImageToSizeZoneMatrixFilter()
Definition: itkEnhancedScalarImageToSizeZoneMatrixFilter.h:246