ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkSampleToSubsampleFilter.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 __itkSampleToSubsampleFilter_h
00019 #define __itkSampleToSubsampleFilter_h
00020 
00021 #include "itkSubsample.h"
00022 #include "itkProcessObject.h"
00023 
00024 namespace itk
00025 {
00026 namespace Statistics
00027 {
00045 template< class TSample >
00046 class ITK_EXPORT SampleToSubsampleFilter:public ProcessObject
00047 {
00048 public:
00050   typedef SampleToSubsampleFilter    Self;
00051   typedef ProcessObject              Superclass;
00052   typedef SmartPointer< Self >       Pointer;
00053   typedef SmartPointer< const Self > ConstPointer;
00054 
00056   itkTypeMacro(SampleToSubsampleFilter, ProcessObject);
00057 
00060   typedef TSample                                    SampleType;
00061   typedef typename SampleType::MeasurementVectorType MeasurementVectorType;
00062   typedef typename SampleType::MeasurementType       MeasurementType;
00063   typedef typename SampleType::InstanceIdentifier    InstanceIdentifier;
00064 
00066   typedef Subsample< SampleType > SubsampleType;
00067   typedef SubsampleType           OutputType;
00068 
00070   using Superclass::SetInput;
00071   virtual void SetInput(const SampleType *sample);
00072 
00073   virtual const SampleType * GetInput() const;
00074 
00076   const OutputType  * GetOutput() const;
00077 
00078 protected:
00079   SampleToSubsampleFilter();
00080   virtual ~SampleToSubsampleFilter();
00081   void PrintSelf(std::ostream & os, Indent indent) const;
00082 
00089   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
00090   using Superclass::MakeOutput;
00091   virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
00093 
00094 private:
00095   SampleToSubsampleFilter(const Self &); //purposely not implemented
00096   void operator=(const Self &);          //purposely not implemented
00097 };                                       // end of class
00098 } // end of namespace Statistics
00099 } // end of namespace itk
00100 
00101 #ifndef ITK_MANUAL_INSTANTIATION
00102 #include "itkSampleToSubsampleFilter.hxx"
00103 #endif
00104 
00105 #endif
00106