go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkImageGridSampler.h
Go to the documentation of this file.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
00012 
00013 ======================================================================*/
00014 
00015 #ifndef __ImageGridSampler_h
00016 #define __ImageGridSampler_h
00017 
00018 #include "itkImageSamplerBase.h"
00019 
00020 namespace itk
00021 {
00022 
00041   template < class TInputImage >
00042   class ImageGridSampler :
00043     public ImageSamplerBase< TInputImage >
00044   {
00045   public:
00046 
00048     typedef ImageGridSampler                Self;
00049     typedef ImageSamplerBase< TInputImage >   Superclass;
00050     typedef SmartPointer<Self>                Pointer;
00051     typedef SmartPointer<const Self>          ConstPointer;
00052 
00054     itkNewMacro( Self );
00055 
00057     itkTypeMacro( ImageGridSampler, ImageSamplerBase );
00058 
00060     typedef typename Superclass::DataObjectPointer            DataObjectPointer;
00061     typedef typename Superclass::OutputVectorContainerType    OutputVectorContainerType;
00062     typedef typename Superclass::OutputVectorContainerPointer OutputVectorContainerPointer;
00063     typedef typename Superclass::InputImageType               InputImageType;
00064     typedef typename Superclass::InputImagePointer            InputImagePointer;
00065     typedef typename Superclass::InputImageConstPointer       InputImageConstPointer;
00066     typedef typename Superclass::InputImageRegionType         InputImageRegionType;
00067     typedef typename Superclass::InputImagePixelType          InputImagePixelType;
00068     typedef typename Superclass::ImageSampleType              ImageSampleType;
00069     typedef typename Superclass::ImageSampleContainerType     ImageSampleContainerType;
00070     typedef typename Superclass::MaskType                     MaskType;
00071 
00073     itkStaticConstMacro( InputImageDimension, unsigned int,
00074       Superclass::InputImageDimension );
00075 
00077     typedef typename InputImageType::IndexType    InputImageIndexType;
00078     typedef typename InputImageType::PointType    InputImagePointType;
00079 
00081     typedef typename InputImageType::OffsetType             SampleGridSpacingType;
00082     typedef typename SampleGridSpacingType::OffsetValueType SampleGridSpacingValueType;
00083     typedef typename InputImageType::SizeType               SampleGridSizeType;
00084     typedef InputImageIndexType                             SampleGridIndexType;
00085     typedef typename InputImageType::SizeType               InputImageSizeType;
00086 
00091     void SetSampleGridSpacing( SampleGridSpacingType arg )
00092     {
00093       this->SetNumberOfSamples(0);
00094       if ( this->m_SampleGridSpacing != arg )
00095       {
00096         this->m_SampleGridSpacing = arg;
00097         this->Modified();
00098       }
00099     }
00100     itkGetConstMacro(SampleGridSpacing, SampleGridSpacingType);
00101 
00119     virtual void SetNumberOfSamples( unsigned long nrofsamples );
00120 
00123     virtual bool SelectNewSamplesOnUpdate(void)
00124     {
00125       return false;
00126     };
00127 
00129     virtual bool SelectingNewSamplesOnUpdateSupported( void ) const
00130     {
00131       return false;
00132     }
00133 
00134   protected:
00135 
00137     ImageGridSampler()
00138     {
00139       this->m_RequestedNumberOfSamples = 0;
00140     }
00141 
00143     virtual ~ImageGridSampler() {};
00144 
00146     void PrintSelf( std::ostream& os, Indent indent ) const;
00147 
00149     virtual void GenerateData( void );
00150 
00152     SampleGridSpacingType m_SampleGridSpacing;
00153 
00155     unsigned long m_RequestedNumberOfSamples;
00156 
00157   private:
00158 
00160     ImageGridSampler( const Self& );          // purposely not implemented
00162     void operator=( const Self& );            // purposely not implemented
00163 
00164   }; // end class ImageGridSampler
00165 
00166 
00167 } // end namespace itk
00168 
00169 #ifndef ITK_MANUAL_INSTANTIATION
00170 #include "itkImageGridSampler.txx"
00171 #endif
00172 
00173 #endif // end #ifndef __ImageGridSampler_h
00174 


Generated on 11-05-2012 for elastix by doxygen 1.7.6.1 elastix logo