Medical Imaging Interaction Toolkit  2018.4.99-b7f3afaa
Medical Imaging Interaction Toolkit
itkEnhancedHistogramToRunLengthFeaturesFilter.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 * http://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 __itkEnhancedHistogramToRunLengthFeaturesFilter_h
31 #define __itkEnhancedHistogramToRunLengthFeaturesFilter_h
32 
33 #include "itkHistogram.h"
34 #include "itkMacro.h"
35 #include "itkProcessObject.h"
36 #include "itkSimpleDataObjectDecorator.h"
37 
38 namespace itk {
39  namespace Statistics {
77  template< typename THistogram >
78  class EnhancedHistogramToRunLengthFeaturesFilter : public ProcessObject
79  {
80  public:
83  typedef ProcessObject Superclass;
86 
88  itkTypeMacro( EnhancedHistogramToRunLengthFeaturesFilter, ProcessObject );
89 
91  itkNewMacro( Self );
92 
93  typedef THistogram HistogramType;
94  typedef typename HistogramType::Pointer HistogramPointer;
95  typedef typename HistogramType::ConstPointer HistogramConstPointer;
96  typedef typename HistogramType::MeasurementType MeasurementType;
97  typedef typename HistogramType::MeasurementVectorType MeasurementVectorType;
98  typedef typename HistogramType::IndexType IndexType;
99  typedef typename HistogramType::
100  TotalAbsoluteFrequencyType FrequencyType;
101 
103  using Superclass::SetInput;
104  void SetInput ( const HistogramType * histogram );
105  const HistogramType * GetInput() const;
106 
108  typedef DataObject::Pointer DataObjectPointer;
109 
111  typedef SimpleDataObjectDecorator<MeasurementType> MeasurementObjectType;
112 
114  MeasurementType GetShortRunEmphasis() const;
115  const MeasurementObjectType* GetShortRunEmphasisOutput() const;
116 
118  MeasurementType GetLongRunEmphasis() const;
119  const MeasurementObjectType* GetLongRunEmphasisOutput() const;
120 
122  MeasurementType GetGreyLevelNonuniformity() const;
123  const MeasurementObjectType* GetGreyLevelNonuniformityOutput() const;
124 
126  MeasurementType GetGreyLevelNonuniformityNormalized() const;
127  const MeasurementObjectType* GetGreyLevelNonuniformityNormalizedOutput() const;
128 
130  MeasurementType GetRunLengthNonuniformity() const;
131  const MeasurementObjectType* GetRunLengthNonuniformityOutput() const;
132 
134  MeasurementType GetRunLengthNonuniformityNormalized() const;
135  const MeasurementObjectType* GetRunLengthNonuniformityNormalizedOutput() const;
136 
138  MeasurementType GetLowGreyLevelRunEmphasis() const;
139  const MeasurementObjectType* GetLowGreyLevelRunEmphasisOutput() const;
140 
142  MeasurementType GetHighGreyLevelRunEmphasis() const;
143  const MeasurementObjectType* GetHighGreyLevelRunEmphasisOutput() const;
144 
146  MeasurementType GetShortRunLowGreyLevelEmphasis() const;
147  const MeasurementObjectType* GetShortRunLowGreyLevelEmphasisOutput() const;
148 
150  MeasurementType GetShortRunHighGreyLevelEmphasis() const;
151  const MeasurementObjectType* GetShortRunHighGreyLevelEmphasisOutput() const;
152 
154  MeasurementType GetLongRunLowGreyLevelEmphasis() const;
155  const MeasurementObjectType* GetLongRunLowGreyLevelEmphasisOutput() const;
156 
158  MeasurementType GetLongRunHighGreyLevelEmphasis() const;
159  const MeasurementObjectType* GetLongRunHighGreyLevelEmphasisOutput() const;
160 
162  MeasurementType GetRunPercentage() const;
163  const MeasurementObjectType* GetRunPercentageOutput() const;
164 
166  MeasurementType GetNumberOfRuns() const;
167  const MeasurementObjectType* GetNumberOfRunsOutput() const;
168 
170  MeasurementType GetGreyLevelVariance() const;
171  const MeasurementObjectType* GetGreyLevelVarianceOutput() const;
172 
174  MeasurementType GetRunLengthVariance() const;
175  const MeasurementObjectType* GetRunLengthVarianceOutput() const;
176 
178  MeasurementType GetRunEntropy() const;
179  const MeasurementObjectType* GetRunEntropyOutput() const;
180 
181  itkGetMacro( TotalNumberOfRuns, unsigned long );
182 
183  itkGetConstMacro(NumberOfVoxels, unsigned long);
184  itkSetMacro(NumberOfVoxels, unsigned long);
185 
187  typedef enum
188  {
207 
209  MeasurementType GetFeature( RunLengthFeatureName name );
210 
211  protected:
214  void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
215 
217  typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
218  using Superclass::MakeOutput;
219  DataObjectPointer MakeOutput( DataObjectPointerArraySizeType ) ITK_OVERRIDE;
220 
221  void GenerateData() ITK_OVERRIDE;
222 
223  private:
224  EnhancedHistogramToRunLengthFeaturesFilter(const Self&); //purposely not implemented
225  void operator=(const Self&); //purposely not implemented
226 
227  unsigned long m_TotalNumberOfRuns;
228  unsigned long m_NumberOfVoxels;
229  };
230  } // end of namespace Statistics
231 } // end of namespace itk
232 
233 #ifndef ITK_MANUAL_INSTANTIATION
234 #include "itkEnhancedHistogramToRunLengthFeaturesFilter.hxx"
235 #endif
236 
237 #endif
const MeasurementObjectType * GetRunPercentageOutput() const
const MeasurementObjectType * GetShortRunHighGreyLevelEmphasisOutput() const
MeasurementType GetFeature(RunLengthFeatureName name)
const MeasurementObjectType * GetRunLengthNonuniformityOutput() const
const MeasurementObjectType * GetRunLengthNonuniformityNormalizedOutput() const
const MeasurementObjectType * GetRunLengthVarianceOutput() const
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE
const MeasurementObjectType * GetShortRunEmphasisOutput() const
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
const MeasurementObjectType * GetGreyLevelNonuniformityOutput() const
const MeasurementObjectType * GetLongRunHighGreyLevelEmphasisOutput() const
const MeasurementObjectType * GetRunEntropyOutput() const
const MeasurementObjectType * GetShortRunLowGreyLevelEmphasisOutput() const
const MeasurementObjectType * GetLongRunLowGreyLevelEmphasisOutput() const
const MeasurementObjectType * GetLowGreyLevelRunEmphasisOutput() const
This class computes texture feature coefficients from a grey level run-length matrix.
const MeasurementObjectType * GetNumberOfRunsOutput() const
const MeasurementObjectType * GetHighGreyLevelRunEmphasisOutput() const
const MeasurementObjectType * GetGreyLevelNonuniformityNormalizedOutput() const
const MeasurementObjectType * GetGreyLevelVarianceOutput() const
const MeasurementObjectType * GetLongRunEmphasisOutput() const