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: 2005/07/26 15:06:23 $
00007   Version:   $Revision: 1.6 $
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);
00081 
00088   virtual void SetSpacing(const double* spacing);
00089   virtual void SetSpacing(const float* spacing);
00090   virtual const double* GetSpacing() const;
00092 
00097   virtual void SetOrigin(const double* origin);
00098   virtual void SetOrigin(const float* origin);
00099   virtual const double * GetOrigin() const;
00101 
00103   itkSetMacro( Size, SizeType )
00104 
00105 
00107   itkSetMacro( DefaultPixelValue, ImagePixelType )
00108 
00109   //--------------------------------------------------------------------------
00110   //
00111   
00113   virtual void EnlargeOutputRequestedRegion(DataObject *output)
00114     {
00115     output->SetRequestedRegionToLargestPossibleRegion();
00116     }
00117 
00118   //
00119   //--------------------------------------------------------------------------
00120   
00121 protected:
00122   ExtractOrthogonalSwath2DImageFilter()
00123     {
00124     m_DefaultPixelValue = NumericTraits<ImagePixelType>::Zero;
00125     m_Size[0] = 512;
00126     m_Size[1] = 16*2+1; // must be odd
00127     m_Origin[0]  = m_Origin[1]  = 0.0;
00128     m_Spacing[0] = m_Spacing[1] = 1.0;
00129     };
00130   virtual ~ExtractOrthogonalSwath2DImageFilter() {};
00131   void PrintSelf(std::ostream& os, Indent indent) const;
00132   
00133   //--------------------------------------------------------------------------
00134   //
00135   
00137   virtual void GenerateOutputInformation(void);
00138 
00140   virtual void GenerateInputRequestedRegion()
00141     {
00142     Superclass::GenerateInputRequestedRegion();
00143     ( const_cast< ImageType * > (this->GetImageInput()) ) ->
00144         SetRequestedRegionToLargestPossibleRegion();
00145     ( const_cast< PathType * > (this->GetPathInput()) ) ->
00146         SetRequestedRegionToLargestPossibleRegion();
00147     }
00149 
00150   virtual void GenerateData(void);
00151   
00152   //
00153   //--------------------------------------------------------------------------
00154   
00155 private:
00156   ExtractOrthogonalSwath2DImageFilter(const Self&); //purposely not implemented
00157   void operator=(const Self&); //purposely not implemented
00158   
00159   ImagePixelType m_DefaultPixelValue;
00160   SizeType  m_Size;
00161   double m_Origin[ImageDimension];
00162   double m_Spacing[ImageDimension];
00163 };
00164 
00165 } // end namespace itk
00166 
00167 #ifndef ITK_MANUAL_INSTANTIATION
00168 #include "itkExtractOrthogonalSwath2DImageFilter.txx"
00169 #endif
00170 
00171 #endif
00172 

Generated at Mon Mar 12 00:10:39 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000