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: 2003/09/10 14:28:47 $
00007   Version:   $Revision: 1.3 $
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>  Superclass;
00048   typedef SmartPointer<Self>   Pointer;
00049   typedef SmartPointer<const Self>  ConstPointer;
00050 
00052   itkNewMacro(Self);
00053   
00055   itkTypeMacro(ExtractOrthogonalSwath2DImageFilter, ImageAndPathToImageFilter);
00056 
00058   typedef           TImage                        ImageType;
00059   typedef typename  ImageType::Pointer            ImagePointer;
00060   typedef typename  ImageType::ConstPointer       ImageConstPointer;
00061   typedef typename  ImageType::RegionType         ImageRegionType; 
00062   typedef typename  ImageType::IndexType          ImageIndexType; 
00063   typedef typename  ImageType::PixelType          ImagePixelType;
00064   typedef           ParametricPath<2>             PathType;
00065   typedef typename  PathType::ConstPointer        PathConstPointer;
00066   typedef typename  PathType::InputType           PathInputType;
00067   typedef typename  PathType::OutputType          PathOutputType;
00068   typedef typename  PathType::IndexType           PathIndexType;
00069   typedef typename  PathType::ContinuousIndexType PathContinuousIndexType;
00070   typedef typename  PathType::OffsetType          PathOffsetType;
00071   typedef typename  PathType::VectorType          PathVectorType;
00072   typedef typename  ImageType::SizeType           SizeType;
00073 
00074 
00076   itkStaticConstMacro(PathDimension, unsigned int,
00077                       2);
00078   itkStaticConstMacro(ImageDimension, unsigned int,
00079                       TImage::ImageDimension);
00080 
00087   virtual void SetSpacing( const double spacing[ImageDimension] );
00088   virtual void SetSpacing( const float spacing[ImageDimension] );
00089   virtual const double* GetSpacing() const;
00090 
00095   virtual void SetOrigin( const double origin[ImageDimension] );
00096   virtual void SetOrigin( const float origin[ImageDimension] );
00097   virtual const double * GetOrigin() const;
00098 
00100   itkSetMacro( Size, SizeType )
00101 
00102   //--------------------------------------------------------------------------
00103   //
00104   
00106   virtual void EnlargeOutputRequestedRegion(DataObject *output)
00107     {
00108     output->SetRequestedRegionToLargestPossibleRegion();
00109     }
00110   
00111   //
00112   //--------------------------------------------------------------------------
00113   
00114 protected:
00115   ExtractOrthogonalSwath2DImageFilter()
00116     {
00117     m_Size[0] = 512;
00118     m_Size[1] = 16*2+1; // must be odd
00119     m_Origin[0]  = m_Origin[1]  = 0.0;
00120     m_Spacing[0] = m_Spacing[1] = 1.0;
00121     };
00122   virtual ~ExtractOrthogonalSwath2DImageFilter() {};
00123   void PrintSelf(std::ostream& os, Indent indent) const;
00124   
00125   //--------------------------------------------------------------------------
00126   //
00127   
00129   virtual void GenerateOutputInformation(void);
00130   
00132   virtual void GenerateInputRequestedRegion()
00133     {
00134     Superclass::GenerateInputRequestedRegion();
00135     ( const_cast< ImageType * > (GetImageInput()) ) ->
00136         SetRequestedRegionToLargestPossibleRegion();
00137     ( const_cast< PathType * > (GetPathInput()) ) ->
00138         SetRequestedRegionToLargestPossibleRegion();
00139     }
00140   
00141   virtual void GenerateData(void);
00142   
00143   //
00144   //--------------------------------------------------------------------------
00145   
00146 private:
00147   ExtractOrthogonalSwath2DImageFilter(const Self&); //purposely not implemented
00148   void operator=(const Self&); //purposely not implemented
00149   
00150   SizeType  m_Size;
00151   double m_Origin[ImageDimension];
00152   double m_Spacing[ImageDimension];
00153 };
00154 
00155 } // end namespace itk
00156 
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkExtractOrthogonalSwath2DImageFilter.txx"
00159 #endif
00160 
00161 #endif

Generated at Tue Sep 16 11:31:57 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000