itkPasteImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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&);
00154 void operator=(const Self&);
00155
00156 };
00157
00158
00159 }
00160
00161 #ifndef ITK_MANUAL_INSTANTIATION
00162 #include "itkPasteImageFilter.txx"
00163 #endif
00164
00165 #endif
00166