ITK  4.6.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 {
102 template< typename THistogram >
104 {
105 public:
111 
114 
116  itkNewMacro(Self);
117 
118  typedef THistogram HistogramType;
119  typedef typename HistogramType::Pointer HistogramPointer;
120  typedef typename HistogramType::ConstPointer HistogramConstPointer;
121  typedef typename HistogramType::MeasurementType MeasurementType;
122  typedef typename HistogramType::MeasurementVectorType MeasurementVectorType;
123  typedef typename HistogramType::IndexType IndexType;
124  typedef typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType;
125  typedef typename HistogramType::RelativeFrequencyType RelativeFrequencyType;
126 
127  typedef typename HistogramType::TotalAbsoluteFrequencyType
129 
130  typedef typename HistogramType::TotalRelativeFrequencyType
132 
134  typedef std::vector< RelativeFrequencyType > RelativeFrequencyContainerType;
135 
137  using Superclass::SetInput;
138  void SetInput(const HistogramType *histogram);
139 
140  const HistogramType * GetInput() const;
141 
144 
147 
149  MeasurementType GetEnergy() const;
150 
151  const MeasurementObjectType * GetEnergyOutput() const;
152 
154  MeasurementType GetEntropy() const;
155 
156  const MeasurementObjectType * GetEntropyOutput() const;
157 
160 
162 
165 
167 
169  MeasurementType GetInertia() const;
170 
171  const MeasurementObjectType * GetInertiaOutput() const;
172 
175 
177 
180 
182 
185 
187 
189  typedef enum {
200 
203 
204 protected:
207  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
208 
213 
214  virtual void GenerateData() ITK_OVERRIDE;
215 
216 private:
217  HistogramToTextureFeaturesFilter(const Self &); //purposely not implemented
218  void operator=(const Self &); //purposely not implemented
219 
220  void ComputeMeansAndVariances(double & pixelMean, double & marginalMean,
221  double & marginalDevSquared, double & pixelVariance);
222 
224 };
225 } // end of namespace Statistics
226 } // end of namespace itk
227 
228 #ifndef ITK_MANUAL_INSTANTIATION
229 #include "itkHistogramToTextureFeaturesFilter.hxx"
230 #endif
231 
232 #endif
const MeasurementObjectType * GetClusterProminenceOutput() const
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
const MeasurementObjectType * GetHaralickCorrelationOutput() const
Light weight base class for most itk classes.
const MeasurementObjectType * GetInverseDifferenceMomentOutput() const
MeasurementType GetFeature(TextureFeatureName name)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
const MeasurementObjectType * GetClusterShadeOutput() const
const MeasurementObjectType * GetEnergyOutput() const
This class computes texture feature coefficients from a grey level co-occurrence matrix.
Decorates any &quot;simple&quot; data type (data types without smart pointers) with a DataObject API...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
void ComputeMeansAndVariances(double &pixelMean, double &marginalMean, double &marginalDevSquared, double &pixelVariance)
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
const MeasurementObjectType * GetCorrelationOutput() const
HistogramType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
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)
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE