ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkMeanSampleFilter.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 __itkMeanSampleFilter_h
19 #define __itkMeanSampleFilter_h
20 
21 #include "itkProcessObject.h"
22 #include "itkArray.h"
24 
25 namespace itk
26 {
27 namespace Statistics
28 {
47 template< typename TSample >
49 {
50 public:
56  typedef TSample SampleType;
57 
59  itkTypeMacro(MeanSampleFilter, ProcessObject);
60  itkNewMacro(Self);
62 
64  typedef typename SampleType::MeasurementVectorType MeasurementVectorType;
65 
67  typedef typename SampleType::MeasurementVectorSizeType MeasurementVectorSizeType;
68 
70  typedef typename SampleType::MeasurementType MeasurementType;
71 
74 
77 
78 
81  void SetInput(const SampleType *sample);
82 
84  const SampleType * GetInput() const;
85 
86 
88  const MeasurementVectorRealType GetMean() const;
89 
95 
96 
98 
99 protected:
101  virtual ~MeanSampleFilter();
102  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
103 
106 
110 
111  virtual void GenerateData() ITK_OVERRIDE;
112 
113 private:
114  MeanSampleFilter(const Self &); //purposely not implemented
115  void operator=(const Self &); //purposely not implemented
116 }; // end of class
117 } // end of namespace Statistics
118 } // end of namespace itk
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
121 #include "itkMeanSampleFilter.hxx"
122 #endif
123 
124 #endif
MeasurementVectorDecoratedType OutputType
Light weight base class for most itk classes.
NumericTraits< MeasurementVectorType >::RealType MeasurementVectorRealType
SampleType::MeasurementVectorType MeasurementVectorType
SampleType::MeasurementType MeasurementType
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
SmartPointer< const Self > ConstPointer
SimpleDataObjectDecorator< MeasurementVectorRealType > MeasurementVectorDecoratedType
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
NumericTraits< MeasurementType >::RealType MeasurementRealType
const MeasurementVectorRealType GetMean() const
const SampleType * GetInput() const
Decorates any &quot;simple&quot; data type (data types without smart pointers) with a DataObject API...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Given a sample, this filter computes the sample mean.
void SetInput(const SampleType *sample)
SampleType::MeasurementVectorSizeType MeasurementVectorSizeType
MeasurementVectorSizeType GetMeasurementVectorSize() const
const MeasurementVectorDecoratedType * GetOutput() const
virtual void GenerateData() ITK_OVERRIDE