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: 2006/03/05 13:15:38 $
00007   Version:   $Revision: 1.5 $
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 
00063   typedef typename TSourceImage::Pointer SourceImagePointer;
00064   typedef typename TSourceImage::ConstPointer SourceImageConstPointer;
00065 
00067   typedef typename TOutputImage::RegionType OutputImageRegionType;
00068   typedef typename TInputImage::RegionType InputImageRegionType;
00069   typedef typename TSourceImage::RegionType SourceImageRegionType;
00070 
00072   typedef typename TOutputImage::PixelType OutputImagePixelType;
00073   typedef typename TInputImage::PixelType InputImagePixelType;
00074   typedef typename TSourceImage::PixelType SourceImagePixelType;
00075 
00077   typedef typename TOutputImage::IndexType OutputImageIndexType;
00078   typedef typename TOutputImage::SizeType OutputImageSizeType;
00079   typedef typename TInputImage::IndexType InputImageIndexType;
00080   typedef typename TInputImage::SizeType InputImageSizeType;
00081   typedef typename TSourceImage::IndexType SourceImageIndexType;
00082   typedef typename TSourceImage::SizeType SourceImageSizeType;
00083 
00085   itkStaticConstMacro(InputImageDimension, unsigned int,
00086                       TInputImage::ImageDimension);
00087   itkStaticConstMacro(OutputImageDimension, unsigned int,
00088                       TOutputImage::ImageDimension);
00089   itkStaticConstMacro(SourceImageDimension, unsigned int,
00090                       TSourceImage::ImageDimension);
00092 
00095   itkSetMacro(DestinationIndex, InputImageIndexType);
00096   itkGetMacro(DestinationIndex, InputImageIndexType);
00098 
00101   itkSetMacro(SourceRegion, SourceImageRegionType);
00102   itkGetMacro(SourceRegion, SourceImageRegionType);
00104 
00107   void SetDestinationImage(TInputImage *dest) { this->SetNthInput(0, dest); }
00108   const TInputImage* GetDestinationImage() { return this->GetInput(0); };
00110 
00113   void SetSourceImage(TSourceImage *src) { this->SetNthInput(1, src); }
00114   const TSourceImage* GetSourceImage() { return this->GetInput(1); };
00116 
00126   virtual void GenerateInputRequestedRegion();
00127 
00128 
00129 protected:
00130   PasteImageFilter();
00131   ~PasteImageFilter() {};
00132   void PrintSelf(std::ostream& os, Indent indent) const;
00133 
00143   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00144                             int threadId );
00145 
00146   SourceImageRegionType m_SourceRegion;
00147   InputImageIndexType m_DestinationIndex;
00148 
00149 private:
00150   PasteImageFilter(const Self&); //purposely not implemented
00151   void operator=(const Self&); //purposely not implemented
00152   
00153 };
00154 
00155   
00156 } // end namespace itk
00157   
00158 #ifndef ITK_MANUAL_INSTANTIATION
00159 #include "itkPasteImageFilter.txx"
00160 #endif
00161   
00162 #endif
00163 

Generated at Tue Jul 29 21:40:05 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000