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 "itkImageToImageFilter.h"
00021
#include "itkSmartPointer.h"
00022
00023
namespace itk
00024 {
00025
00042
template <
class TInputImage>
00043 class ITK_EXPORT PasteImageFilter:
00044
public ImageToImageFilter<TInputImage,TInputImage>
00045 {
00046
public:
00048 typedef PasteImageFilter
Self;
00049 typedef ImageToImageFilter<TInputImage,TInputImage> Superclass;
00050 typedef SmartPointer<Self> Pointer;
00051 typedef SmartPointer<const Self> ConstPointer;
00052
00054
itkNewMacro(
Self);
00055
00057
itkTypeMacro(PasteImageFilter,
ImageToImageFilter);
00058
00060 typedef typename Superclass::InputImagePointer
InputImagePointer;
00061 typedef typename Superclass::OutputImagePointer
OutputImagePointer;
00062
00064 typedef typename TInputImage::RegionType
OutputImageRegionType;
00065 typedef typename TInputImage::RegionType
InputImageRegionType;
00066
00068 typedef typename TInputImage::PixelType
OutputImagePixelType;
00069 typedef typename TInputImage::PixelType
InputImagePixelType;
00070
00072 typedef typename TInputImage::IndexType
OutputImageIndexType;
00073 typedef typename TInputImage::IndexType
InputImageIndexType;
00074 typedef typename TInputImage::SizeType
OutputImageSizeType;
00075 typedef typename TInputImage::SizeType
InputImageSizeType;
00076
00078
itkStaticConstMacro(InputImageDimension,
unsigned int,
00079 TInputImage::ImageDimension);
00080
itkStaticConstMacro(OutputImageDimension,
unsigned int,
00081 TInputImage::ImageDimension);
00082
00085
itkSetMacro(DestinationIndex,
InputImageIndexType);
00086
itkGetMacro(DestinationIndex,
InputImageIndexType);
00087
00090
itkSetMacro(SourceRegion,
InputImageRegionType);
00091
itkGetMacro(SourceRegion,
InputImageRegionType);
00092
00095
void SetDestinationImage(TInputImage *dest) { this->SetNthInput(0, dest); }
00096
const TInputImage* GetDestinationImage() {
return this->GetInput(0); };
00097
00100
void SetSourceImage(TInputImage *src) { this->SetNthInput(1, src); }
00101
const TInputImage* GetSourceImage() {
return this->GetInput(1); };
00102
00112
virtual void GenerateInputRequestedRegion();
00113
00114
00115
protected:
00116 PasteImageFilter();
00117 ~PasteImageFilter() {};
00118
void PrintSelf(std::ostream& os, Indent indent)
const;
00119
00129
void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread,
00130
int threadId );
00131
00132 InputImageRegionType m_SourceRegion;
00133 InputImageIndexType m_DestinationIndex;
00134
00135
private:
00136 PasteImageFilter(
const Self&);
00137 void operator=(
const Self&);
00138
00139 };
00140
00141
00142 }
00143
00144
#ifndef ITK_MANUAL_INSTANTIATION
00145
#include "itkPasteImageFilter.txx"
00146
#endif
00147
00148
#endif