Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkExtractOrthogonalSwath2DImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkExtractOrthogonalSwath2DImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-14 19:20:34 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkExtractOrthogonalSwath2DImageFilter_h
00018 #define __itkExtractOrthogonalSwath2DImageFilter_h
00019 
00020 #include "itkImageAndPathToImageFilter.h"
00021 #include "itkParametricPath.h"
00022 
00023 namespace itk
00024 {
00025   
00040 template <class TImage>
00041 class ITK_EXPORT ExtractOrthogonalSwath2DImageFilter : public
00042 ImageAndPathToImageFilter<TImage,ParametricPath<2>,TImage> 
00043 {
00044 public:
00046   typedef ExtractOrthogonalSwath2DImageFilter  Self;
00047   typedef ImageAndPathToImageFilter<TImage,ParametricPath<2>,TImage>
00048                                                Superclass;
00049   typedef SmartPointer<Self>                   Pointer;
00050   typedef SmartPointer<const Self>             ConstPointer;
00051 
00053   itkNewMacro(Self);
00054 
00056   itkTypeMacro(ExtractOrthogonalSwath2DImageFilter, ImageAndPathToImageFilter);
00057 
00059   typedef           TImage                        ImageType;
00060   typedef typename  ImageType::Pointer            ImagePointer;
00061   typedef typename  ImageType::ConstPointer       ImageConstPointer;
00062   typedef typename  ImageType::RegionType         ImageRegionType; 
00063   typedef typename  ImageType::IndexType          ImageIndexType; 
00064   typedef typename  ImageType::PixelType          ImagePixelType;
00065   typedef           ParametricPath<2>             PathType;
00066   typedef typename  PathType::ConstPointer        PathConstPointer;
00067   typedef typename  PathType::InputType           PathInputType;
00068   typedef typename  PathType::OutputType          PathOutputType;
00069   typedef typename  PathType::IndexType           PathIndexType;
00070   typedef typename  PathType::ContinuousIndexType PathContinuousIndexType;
00071   typedef typename  PathType::OffsetType          PathOffsetType;
00072   typedef typename  PathType::VectorType          PathVectorType;
00073   typedef typename  ImageType::SizeType           SizeType;
00074 
00075 
00077   itkStaticConstMacro(PathDimension, unsigned int,
00078                       2);
00079   itkStaticConstMacro(ImageDimension, unsigned int,
00080                       TImage::ImageDimension);
00082 
00089   virtual void SetSpacing(const double* spacing);
00090   virtual void SetSpacing(const float* spacing);
00091   virtual const double* GetSpacing() const;
00093 
00098   virtual void SetOrigin(const double* origin);
00099   virtual void SetOrigin(const float* origin);
00100   virtual const double * GetOrigin() const;
00102 
00104   itkSetMacro( Size, SizeType )
00105 
00106 
00108   itkSetMacro( DefaultPixelValue, ImagePixelType )
00109 
00110   //--------------------------------------------------------------------------
00111   //
00112   
00114   virtual void EnlargeOutputRequestedRegion(DataObject *output)
00115     {
00116     output->SetRequestedRegionToLargestPossibleRegion();
00117     }
00118 
00119   //
00120   //--------------------------------------------------------------------------
00121   
00122 protected:
00123   ExtractOrthogonalSwath2DImageFilter()
00124     {
00125     m_DefaultPixelValue = NumericTraits<ImagePixelType>::Zero;
00126     m_Size[0] = 512;
00127     m_Size[1] = 16*2+1; // must be odd
00128     m_Origin[0]  = m_Origin[1]  = 0.0;
00129     m_Spacing[0] = m_Spacing[1] = 1.0;
00130     }
00131   virtual ~ExtractOrthogonalSwath2DImageFilter() {};
00132   void PrintSelf(std::ostream& os, Indent indent) const;
00133   
00134   //--------------------------------------------------------------------------
00135   //
00136   
00138   virtual void GenerateOutputInformation(void);
00139 
00141   virtual void GenerateInputRequestedRegion()
00142     {
00143     Superclass::GenerateInputRequestedRegion();
00144     ( const_cast< ImageType * > (this->GetImageInput()) ) ->
00145         SetRequestedRegionToLargestPossibleRegion();
00146     ( const_cast< PathType * > (this->GetPathInput()) ) ->
00147         SetRequestedRegionToLargestPossibleRegion();
00148     }
00150 
00151   virtual void GenerateData(void);
00152   
00153   //
00154   //--------------------------------------------------------------------------
00155   
00156 private:
00157   ExtractOrthogonalSwath2DImageFilter(const Self&); //purposely not implemented
00158   void operator=(const Self&); //purposely not implemented
00159   
00160   ImagePixelType m_DefaultPixelValue;
00161   SizeType       m_Size;
00162   double         m_Origin[ImageDimension];
00163   double         m_Spacing[ImageDimension];
00164 };
00165 
00166 } // end namespace itk
00167 
00168 #ifndef ITK_MANUAL_INSTANTIATION
00169 #include "itkExtractOrthogonalSwath2DImageFilter.txx"
00170 #endif
00171 
00172 #endif
00173 

Generated at Tue Sep 15 02:53:05 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000