Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 /*=========================================================================
18 *
19 * Copyright Insight Software Consortium
20 *
21 * Licensed under the Apache License, Version 2.0 (the "License");
22 * you may not use this file except in compliance with the License.
23 * You may obtain a copy of the License at
24 *
25 * http://www.apache.org/licenses/LICENSE-2.0.txt
26 *
27 * Unless required by applicable law or agreed to in writing, software
28 * distributed under the License is distributed on an "AS IS" BASIS,
29 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 * See the License for the specific language governing permissions and
31 * limitations under the License.
32 *
33 *=========================================================================*/
34 #ifndef __itkEnhancedHistogramToRunLengthFeaturesFilter_h
35 #define __itkEnhancedHistogramToRunLengthFeaturesFilter_h
36 
37 #include "itkHistogram.h"
38 #include "itkMacro.h"
39 #include "itkProcessObject.h"
40 #include "itkSimpleDataObjectDecorator.h"
41 
42 namespace itk {
43  namespace Statistics {
81  template< typename THistogram >
82  class EnhancedHistogramToRunLengthFeaturesFilter : public ProcessObject
83  {
84  public:
87  typedef ProcessObject Superclass;
90 
92  itkTypeMacro( EnhancedHistogramToRunLengthFeaturesFilter, ProcessObject );
93 
95  itkNewMacro( Self );
96 
97  typedef THistogram HistogramType;
100  typedef typename HistogramType::MeasurementType MeasurementType;
101  typedef typename HistogramType::MeasurementVectorType MeasurementVectorType;
102  typedef typename HistogramType::IndexType IndexType;
103  typedef typename HistogramType::
104  TotalAbsoluteFrequencyType FrequencyType;
105 
107  using Superclass::SetInput;
108  void SetInput ( const HistogramType * histogram );
109  const HistogramType * GetInput() const;
110 
113 
115  typedef SimpleDataObjectDecorator<MeasurementType> MeasurementObjectType;
116 
118  MeasurementType GetShortRunEmphasis() const;
119  const MeasurementObjectType* GetShortRunEmphasisOutput() const;
120 
122  MeasurementType GetLongRunEmphasis() const;
123  const MeasurementObjectType* GetLongRunEmphasisOutput() const;
124 
126  MeasurementType GetGreyLevelNonuniformity() const;
127  const MeasurementObjectType* GetGreyLevelNonuniformityOutput() const;
128 
130  MeasurementType GetRunLengthNonuniformity() const;
131  const MeasurementObjectType* GetRunLengthNonuniformityOutput() const;
132 
134  MeasurementType GetLowGreyLevelRunEmphasis() const;
135  const MeasurementObjectType* GetLowGreyLevelRunEmphasisOutput() const;
136 
138  MeasurementType GetHighGreyLevelRunEmphasis() const;
139  const MeasurementObjectType* GetHighGreyLevelRunEmphasisOutput() const;
140 
142  MeasurementType GetShortRunLowGreyLevelEmphasis() const;
143  const MeasurementObjectType* GetShortRunLowGreyLevelEmphasisOutput() const;
144 
146  MeasurementType GetShortRunHighGreyLevelEmphasis() const;
147  const MeasurementObjectType* GetShortRunHighGreyLevelEmphasisOutput() const;
148 
150  MeasurementType GetLongRunLowGreyLevelEmphasis() const;
151  const MeasurementObjectType* GetLongRunLowGreyLevelEmphasisOutput() const;
152 
154  MeasurementType GetLongRunHighGreyLevelEmphasis() const;
155  const MeasurementObjectType* GetLongRunHighGreyLevelEmphasisOutput() const;
156 
158  MeasurementType GetRunPercentage() const;
159  const MeasurementObjectType* GetRunPercentageOutput() const;
160 
162  MeasurementType GetNumberOfRuns() const;
163  const MeasurementObjectType* GetNumberOfRunsOutput() const;
164 
165  itkGetMacro( TotalNumberOfRuns, unsigned long );
166 
167  itkGetConstMacro(NumberOfVoxels, unsigned long);
168  itkSetMacro(NumberOfVoxels, unsigned long);
169 
171  typedef enum
172  {
186 
188  MeasurementType GetFeature( RunLengthFeatureName name );
189 
190  protected:
193  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
194 
196  typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
197  using Superclass::MakeOutput;
198  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType ) ITK_OVERRIDE;
199 
200  virtual void GenerateData() ITK_OVERRIDE;
201 
202  private:
203  EnhancedHistogramToRunLengthFeaturesFilter(const Self&); //purposely not implemented
204  void operator=(const Self&); //purposely not implemented
205 
206  unsigned long m_TotalNumberOfRuns;
207  unsigned long m_NumberOfVoxels;
208  };
209  } // end of namespace Statistics
210 } // end of namespace itk
211 
212 #ifndef ITK_MANUAL_INSTANTIATION
213 #include "itkEnhancedHistogramToRunLengthFeaturesFilter.hxx"
214 #endif
215 
216 #endif
const MeasurementObjectType * GetHighGreyLevelRunEmphasisOutput() const
MeasurementType GetFeature(RunLengthFeatureName name)
itk::SmartPointer< Self > Pointer
const MeasurementObjectType * GetLongRunLowGreyLevelEmphasisOutput() const
const MeasurementObjectType * GetLongRunHighGreyLevelEmphasisOutput() const
itk::SmartPointer< const Self > ConstPointer
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
const MeasurementObjectType * GetNumberOfRunsOutput() const
const MeasurementObjectType * GetLowGreyLevelRunEmphasisOutput() const
const MeasurementObjectType * GetShortRunLowGreyLevelEmphasisOutput() const
This class computes texture feature coefficients from a grey level run-length matrix.
const MeasurementObjectType * GetRunLengthNonuniformityOutput() const
const MeasurementObjectType * GetGreyLevelNonuniformityOutput() const
const MeasurementObjectType * GetShortRunEmphasisOutput() const
const MeasurementObjectType * GetLongRunEmphasisOutput() const
const MeasurementObjectType * GetShortRunHighGreyLevelEmphasisOutput() const
const MeasurementObjectType * GetRunPercentageOutput() const
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE