ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkScalarImageToRunLengthFeaturesFilter.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 __itkScalarImageToRunLengthFeaturesFilter_h
19 #define __itkScalarImageToRunLengthFeaturesFilter_h
20 
21 #include "itkDataObjectDecorator.h"
22 
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
94 template< class TImageType,
95  class THistogramFrequencyContainer = DenseFrequencyContainer2 >
97 {
98 public:
104 
107 
109  itkNewMacro(Self);
110 
111  typedef THistogramFrequencyContainer FrequencyContainerType;
112  typedef TImageType ImageType;
113  typedef typename ImageType::Pointer ImagePointer;
114 
115  typedef typename ImageType::PixelType PixelType;
116  typedef typename ImageType::OffsetType OffsetType;
120 
123 
126 
129 
130  typedef short RunLengthFeatureName;
131  typedef VectorContainer<unsigned char,
137 
140 
144 
145  const FeatureValueVectorDataObjectType * GetFeatureMeansOutput() const;
146 
147  const FeatureValueVectorDataObjectType * GetFeatureStandardDeviationsOutput()
148  const;
149 
152  using Superclass::SetInput;
153  void SetInput(const ImageType *);
154 
155  const ImageType * GetInput() const;
156 
158  itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
159  itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
161 
163  itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
164  itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
166 
169  itkSetConstObjectMacro(Offsets, OffsetVector);
170  itkGetConstObjectMacro(Offsets, OffsetVector);
172 
175  void SetNumberOfBinsPerAxis(unsigned int);
176 
179  void SetPixelValueMinMax(PixelType min, PixelType max);
181 
184  void SetDistanceValueMinMax( double min, double max );
186 
189  void SetMaskImage(const ImageType *);
190 
191  const ImageType * GetMaskImage() const;
192 
195  void SetInsidePixelValue(PixelType InsidePixelValue);
196 
197  itkGetConstMacro(FastCalculations, bool);
198  itkSetMacro(FastCalculations, bool);
199  itkBooleanMacro(FastCalculations);
200 
201 protected:
204  void PrintSelf( std::ostream & os, Indent indent ) const;
205 
206  void FastCompute();
207 
208  void FullCompute();
209 
211  virtual void GenerateData();
212 
215  using Superclass::MakeOutput;
217 
218 private:
220 
226 };
227 } // end of namespace Statistics
228 } // end of namespace itk
229 
230 #ifndef ITK_MANUAL_INSTANTIATION
231 #include "itkScalarImageToRunLengthFeaturesFilter.hxx"
232 #endif
233 
234 #endif
235