ITK  4.10.0
Insight Segmentation and Registration Toolkit
itkHistogramToTextureFeaturesFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkHistogramToTextureFeaturesFilter_h
19 #define itkHistogramToTextureFeaturesFilter_h
20 
21 #include "itkHistogram.h"
22 #include "itkMacro.h"
23 #include "itkProcessObject.h"
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
101 template< typename THistogram >
103 {
104 public:
110 
113 
115  itkNewMacro(Self);
116 
117  typedef THistogram HistogramType;
118  typedef typename HistogramType::Pointer HistogramPointer;
119  typedef typename HistogramType::ConstPointer HistogramConstPointer;
120  typedef typename HistogramType::MeasurementType MeasurementType;
121  typedef typename HistogramType::MeasurementVectorType MeasurementVectorType;
122  typedef typename HistogramType::IndexType IndexType;
123  typedef typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType;
124  typedef typename HistogramType::RelativeFrequencyType RelativeFrequencyType;
125 
126  typedef typename HistogramType::TotalAbsoluteFrequencyType
128 
129  typedef typename HistogramType::TotalRelativeFrequencyType
131 
133  typedef std::vector< RelativeFrequencyType > RelativeFrequencyContainerType;
134 
136  using Superclass::SetInput;
137  void SetInput(const HistogramType *histogram);
138 
139  const HistogramType * GetInput() const;
140 
143 
146 
148  MeasurementType GetEnergy() const;
149 
150  const MeasurementObjectType * GetEnergyOutput() const;
151 
153  MeasurementType GetEntropy() const;
154 
155  const MeasurementObjectType * GetEntropyOutput() const;
156 
158  MeasurementType GetCorrelation() const;
159 
160  const MeasurementObjectType * GetCorrelationOutput() const;
161 
163  MeasurementType GetInverseDifferenceMoment() const;
164 
165  const MeasurementObjectType * GetInverseDifferenceMomentOutput() const;
166 
168  MeasurementType GetInertia() const;
169 
170  const MeasurementObjectType * GetInertiaOutput() const;
171 
173  MeasurementType GetClusterShade() const;
174 
175  const MeasurementObjectType * GetClusterShadeOutput() const;
176 
178  MeasurementType GetClusterProminence() const;
179 
180  const MeasurementObjectType * GetClusterProminenceOutput() const;
181 
183  MeasurementType GetHaralickCorrelation() const;
184 
185  const MeasurementObjectType * GetHaralickCorrelationOutput() const;
186 
188  typedef enum {
199 
201  MeasurementType GetFeature(TextureFeatureName name);
202 
203 protected:
206  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
207 
211  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE;
212 
213  virtual void GenerateData() ITK_OVERRIDE;
214 
215 private:
216  HistogramToTextureFeaturesFilter(const Self &) ITK_DELETE_FUNCTION;
217  void operator=(const Self &) ITK_DELETE_FUNCTION;
218 
219  void ComputeMeansAndVariances(double & pixelMean, double & marginalMean,
220  double & marginalDevSquared, double & pixelVariance);
221 
222  RelativeFrequencyContainerType m_RelativeFrequencyContainer;
223 };
224 } // end of namespace Statistics
225 } // end of namespace itk
226 
227 #ifndef ITK_MANUAL_INSTANTIATION
228 #include "itkHistogramToTextureFeaturesFilter.hxx"
229 #endif
230 
231 #endif
const MeasurementObjectType * GetClusterProminenceOutput() const
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
const MeasurementObjectType * GetHaralickCorrelationOutput() const
const MeasurementObjectType * GetInverseDifferenceMomentOutput() const
MeasurementType GetFeature(TextureFeatureName name)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Definition: itkArray.h:30
virtual void PrintSelf(std::ostream &os, Indent indent) const override
const MeasurementObjectType * GetClusterShadeOutput() const
const MeasurementObjectType * GetEnergyOutput() const
This class computes texture feature coefficients from a grey level co-occurrence matrix.
Decorates any "simple" data type (data types without smart pointers) with a DataObject API...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override
Make a DataObject of the correct type to used as the specified output.
void ComputeMeansAndVariances(double &pixelMean, double &marginalMean, double &marginalDevSquared, double &pixelVariance)
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
const MeasurementObjectType * GetCorrelationOutput() const
HistogramType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
HistogramType::TotalRelativeFrequencyType TotalRelativeFrequencyType
SimpleDataObjectDecorator< MeasurementType > MeasurementObjectType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
const MeasurementObjectType * GetEntropyOutput() const
const MeasurementObjectType * GetInertiaOutput() const
void SetInput(const HistogramType *histogram)