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

itkSliceBySliceImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSliceBySliceImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-07-10 10:07:08 $
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 
00018 #ifndef __itkSliceBySliceImageFilter_h
00019 #define __itkSliceBySliceImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 
00024 namespace itk {
00025 
00072 template<class TInputImage,
00073   class TOutputImage,
00074   class TInputFilter=ImageToImageFilter< 
00075     Image< ITK_TYPENAME TInputImage::PixelType,  ::itk::GetImageDimension<TInputImage >::ImageDimension - 1 >,
00076     Image< ITK_TYPENAME TOutputImage::PixelType, ::itk::GetImageDimension<TOutputImage>::ImageDimension - 1 > >,
00077   class TOutputFilter=TInputFilter,
00078   class TInternalInputImage=ITK_TYPENAME TInputFilter::InputImageType,
00079   class TInternalOutputImage=ITK_TYPENAME TOutputFilter::OutputImageType >
00080 class ITK_EXPORT SliceBySliceImageFilter : 
00081 public ImageToImageFilter<TInputImage, TOutputImage>
00082 {
00083 public:
00085   typedef SliceBySliceImageFilter                         Self;
00086   typedef ImageToImageFilter<TInputImage,TOutputImage>    Superclass;
00087   typedef SmartPointer<Self>                              Pointer;
00088   typedef SmartPointer<const Self>                        ConstPointer;
00089 
00091   typedef typename Superclass::InputImagePointer InputImagePointer;
00092 
00094   itkNewMacro(Self);
00095 
00097   itkTypeMacro(SliceBySliceImageFilter, ImageToImageFilter);
00098 
00100   typedef TInputImage                           InputImageType;
00101   typedef typename TInputImage::RegionType      RegionType;
00102   typedef typename TInputImage::SizeType        SizeType;
00103   typedef typename TInputImage::IndexType       IndexType;
00104   typedef typename TInputImage::PixelType       PixelType;
00105   typedef typename TInputImage::OffsetType      OffsetType;
00106 
00107   typedef TOutputImage                          OutputImageType;
00108   typedef typename TOutputImage::PixelType      OutputPixelType;
00109 
00110   typedef TInputFilter                          InputFilterType;
00111   typedef TOutputFilter                         OutputFilterType;
00112   
00113   typedef TInternalInputImage                         InternalInputImageType;
00114   typedef typename InternalInputImageType::RegionType InternalRegionType;
00115   typedef typename InternalInputImageType::SizeType   InternalSizeType;
00116   typedef typename InternalInputImageType::IndexType  InternalIndexType;
00117   typedef typename InternalInputImageType::OffsetType InternalOffsetType;
00118   typedef typename InternalInputImageType::PixelType  InternalInputPixelType;
00119 
00120   typedef TInternalOutputImage                        InternalOutputImageType;
00121   typedef typename InternalOutputImageType::PixelType InternalOutputPixelType;
00122 
00124   itkStaticConstMacro(ImageDimension, unsigned int,
00125                       TInputImage::ImageDimension);
00126 
00127   itkStaticConstMacro(InternalImageDimension, unsigned int,
00128                       InternalInputImageType::ImageDimension);
00129 
00130   itkSetMacro(Dimension, unsigned int);
00131   itkGetMacro(Dimension, unsigned int);
00132 
00133   void SetFilter(InputFilterType * filter);
00134   InputFilterType * GetFilter()
00135     {
00136     return this->m_InputFilter;
00137     }
00138 
00139   const InputFilterType * GetFilter() const
00140     {
00141     return this->m_InputFilter;
00142     }
00143 
00144   void SetInputFilter( InputFilterType * filter );
00145   itkGetObjectMacro( InputFilter, InputFilterType );
00146 
00147   void SetOutputFilter( OutputFilterType * filter );
00148   itkGetObjectMacro( OutputFilter, OutputFilterType );
00149 
00150 protected:
00151   SliceBySliceImageFilter();
00152   ~SliceBySliceImageFilter() {};
00153 
00154   void GenerateData();
00155 
00156   void PrintSelf(std::ostream& os, Indent indent) const;
00157 
00158   void GenerateInputRequestedRegion();
00159   void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00160 
00161 private:
00162   SliceBySliceImageFilter(const Self&); //purposely not implemented
00163   void operator=(const Self&); //purposely not implemented
00164 
00165   unsigned int                            m_Dimension;
00166   typename InputFilterType::Pointer       m_InputFilter;
00167   typename OutputFilterType::Pointer      m_OutputFilter;
00168 
00169 };
00170 
00171 }
00172 
00173 #ifndef ITK_MANUAL_INSTANTIATION
00174 #include "itkSliceBySliceImageFilter.txx"
00175 #endif
00176 
00177 #endif
00178 

Generated at Thu Nov 6 00:14:30 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000