ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkStandardDeviationPerComponentSampleFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkStandardDeviationPerComponentSampleFilter_h
00019 #define __itkStandardDeviationPerComponentSampleFilter_h
00020 
00021 #include "itkProcessObject.h"
00022 
00023 #include "itkVariableSizeMatrix.h"
00024 #include "itkSimpleDataObjectDecorator.h"
00025 #include "itkNumericTraitsFixedArrayPixel.h"
00026 
00027 namespace itk
00028 {
00029 namespace Statistics
00030 {
00048 template< class TSample >
00049 class ITK_EXPORT StandardDeviationPerComponentSampleFilter:
00050   public ProcessObject
00051 {
00052 public:
00054   typedef StandardDeviationPerComponentSampleFilter Self;
00055   typedef ProcessObject                             Superclass;
00056   typedef SmartPointer< Self >                      Pointer;
00057   typedef SmartPointer< const Self >                ConstPointer;
00058   typedef TSample                                   SampleType;
00059 
00061   itkTypeMacro(StandardDeviationPerComponentSampleFilter, ProcessObject);
00062   itkNewMacro(Self);
00064 
00066   typedef typename TSample::MeasurementVectorSizeType MeasurementVectorSizeType;
00067 
00069   typedef typename TSample::MeasurementVectorType                   MeasurementVectorType;
00070   typedef typename NumericTraits< MeasurementVectorType >::RealType MeasurementVectorRealType;
00071 
00073   using Superclass::SetInput;
00074   void SetInput(const SampleType *sample);
00075 
00076   const SampleType *  GetInput() const;
00077 
00080   typedef  SimpleDataObjectDecorator< MeasurementVectorRealType > MeasurementVectorRealDecoratedType;
00081 
00082   typedef MeasurementVectorRealDecoratedType OutputType;
00083 
00085   const MeasurementVectorRealType GetStandardDeviationPerComponent() const;
00086 
00087   const MeasurementVectorRealDecoratedType * GetStandardDeviationPerComponentOutput() const;
00088 
00090   const MeasurementVectorRealType GetMeanPerComponent() const;
00091 
00092   const MeasurementVectorRealDecoratedType * GetMeanPerComponentOutput() const;
00093 
00094 protected:
00095   StandardDeviationPerComponentSampleFilter(const Self &); //purposely not
00096                                                            // implemented
00097   void operator=(const Self &);                            //purposely not
00098                                                            // implemented
00099 
00100   StandardDeviationPerComponentSampleFilter();
00101   virtual ~StandardDeviationPerComponentSampleFilter();
00102   void PrintSelf(std::ostream & os, Indent indent) const;
00103 
00105   typedef DataObject::Pointer DataObjectPointer;
00106 
00107   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
00108   using Superclass::MakeOutput;
00109   virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
00110 
00111   void GenerateData();
00112 
00113   MeasurementVectorSizeType GetMeasurementVectorSize() const;
00114 
00115 private:
00116 };  // end of class
00117 } // end of namespace Statistics
00118 } // end of namespace itk
00119 
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkStandardDeviationPerComponentSampleFilter.hxx"
00122 #endif
00123 
00124 #endif
00125