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

itkPasteImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPasteImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-07-14 11:49:10 $
00007   Version:   $Revision: 1.8 $
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 __itkPasteImageFilter_h
00018 #define __itkPasteImageFilter_h
00019 
00020 #include "itkInPlaceImageFilter.h"
00021 #include "itkSmartPointer.h"
00022 
00023 namespace itk
00024 {
00025 
00042 template <class TInputImage, class TSourceImage=TInputImage, class TOutputImage=TInputImage>
00043 class ITK_EXPORT PasteImageFilter:
00044     public InPlaceImageFilter<TInputImage,TOutputImage>
00045 {
00046 public:
00048   typedef PasteImageFilter                              Self;
00049   typedef InPlaceImageFilter<TInputImage,TOutputImage>  Superclass;
00050   typedef SmartPointer<Self>                            Pointer;
00051   typedef SmartPointer<const Self>                      ConstPointer;
00052 
00054   itkNewMacro(Self);  
00055 
00057   itkTypeMacro(PasteImageFilter, InPlaceImageFilter);
00058 
00060   typedef typename Superclass::InputImagePointer  InputImagePointer;
00061   typedef typename Superclass::OutputImagePointer OutputImagePointer;
00062 
00064   typedef TInputImage                           InputImageType;
00065   typedef TOutputImage                          OutputImageType;
00066   typedef TSourceImage                          SourceImageType;
00067   typedef typename OutputImageType::RegionType  OutputImageRegionType;
00068   typedef typename InputImageType::RegionType   InputImageRegionType;
00069   typedef typename SourceImageType::RegionType  SourceImageRegionType;
00070 
00071   typedef typename SourceImageType::Pointer      SourceImagePointer;
00072   typedef typename SourceImageType::ConstPointer SourceImageConstPointer;
00073 
00075   typedef typename OutputImageType::PixelType OutputImagePixelType;
00076   typedef typename InputImageType::PixelType  InputImagePixelType;
00077   typedef typename SourceImageType::PixelType SourceImagePixelType;
00078 
00080   typedef typename OutputImageType::IndexType OutputImageIndexType;
00081   typedef typename OutputImageType::SizeType  OutputImageSizeType;
00082   typedef typename InputImageType::IndexType  InputImageIndexType;
00083   typedef typename InputImageType::SizeType   InputImageSizeType;
00084   typedef typename SourceImageType::IndexType SourceImageIndexType;
00085   typedef typename SourceImageType::SizeType  SourceImageSizeType;
00086 
00088   itkStaticConstMacro(InputImageDimension, unsigned int,
00089                       InputImageType::ImageDimension);
00090   itkStaticConstMacro(OutputImageDimension, unsigned int,
00091                       OutputImageType::ImageDimension);
00092   itkStaticConstMacro(SourceImageDimension, unsigned int,
00093                       SourceImageType::ImageDimension);
00095 
00098   itkSetMacro(DestinationIndex, InputImageIndexType);
00099   itkGetConstMacro(DestinationIndex, InputImageIndexType);
00101 
00104   itkSetMacro(SourceRegion, SourceImageRegionType);
00105   itkGetConstMacro(SourceRegion, SourceImageRegionType);
00107 
00110   void SetDestinationImage(const InputImageType *dest);
00111   const InputImageType * GetDestinationImage() const;
00113 
00116   void SetSourceImage(const SourceImageType *src);
00117   const SourceImageType * GetSourceImage() const;
00119 
00129   virtual void GenerateInputRequestedRegion();
00130 
00131 
00132 protected:
00133   PasteImageFilter();
00134   ~PasteImageFilter() {};
00135   void PrintSelf(std::ostream& os, Indent indent) const;
00136 
00146   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00147                             int threadId );
00148 
00149   SourceImageRegionType m_SourceRegion;
00150   InputImageIndexType   m_DestinationIndex;
00151 
00152 private:
00153   PasteImageFilter(const Self&); //purposely not implemented
00154   void operator=(const Self&); //purposely not implemented
00155   
00156 };
00157 
00158   
00159 } // end namespace itk
00160   
00161 #ifndef ITK_MANUAL_INSTANTIATION
00162 #include "itkPasteImageFilter.txx"
00163 #endif
00164   
00165 #endif
00166 

Generated at Mon Jul 12 2010 19:25:15 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000