00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkRegionOfInterestImageFilter_h
00018
#define __itkRegionOfInterestImageFilter_h
00019
00020
#include "itkImageToImageFilter.h"
00021
#include "itkSmartPointer.h"
00022
00023
namespace itk
00024 {
00025
00045
template <
class TInputImage,
class TOutputImage>
00046 class ITK_EXPORT RegionOfInterestImageFilter:
00047
public ImageToImageFilter<TInputImage,TOutputImage>
00048 {
00049
public:
00051 typedef RegionOfInterestImageFilter
Self;
00052 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00053 typedef SmartPointer<Self> Pointer;
00054 typedef SmartPointer<const Self> ConstPointer;
00055 typedef typename Superclass::InputImageRegionType
InputImageRegionType;
00056
00058
itkNewMacro(
Self);
00059
00061
itkTypeMacro(RegionOfInterestImageFilter,
ImageToImageFilter);
00062
00064 typedef typename TInputImage::RegionType
RegionType;
00065 typedef typename TInputImage::IndexType
IndexType;
00066 typedef typename TInputImage::SizeType
SizeType;
00067
00069 typedef typename TOutputImage::PixelType
OutputImagePixelType;
00070 typedef typename TInputImage::PixelType
InputImagePixelType;
00071
00073
itkSetMacro(RegionOfInterest,
RegionType);
00074
itkGetMacro(RegionOfInterest,
RegionType);
00075
00077
itkStaticConstMacro(ImageDimension,
unsigned int,
00078 TInputImage::ImageDimension);
00079
protected:
00080 RegionOfInterestImageFilter();
00081 ~RegionOfInterestImageFilter() {};
00082 void PrintSelf(std::ostream& os,
Indent indent)
const;
00083
00084
00085
virtual void GenerateInputRequestedRegion();
00086
virtual void EnlargeOutputRequestedRegion(
DataObject *output);
00087
00096
virtual void GenerateOutputInformation();
00097
00098
00108
void ThreadedGenerateData(
const RegionType& outputRegionForThread,
00109
int threadId );
00110
00111
private:
00112 RegionOfInterestImageFilter(
const Self&);
00113
void operator=(
const Self&);
00114
00115
RegionType m_RegionOfInterest;
00116 };
00117
00118
00119 }
00120
00121
#ifndef ITK_MANUAL_INSTANTIATION
00122
#include "itkRegionOfInterestImageFilter.txx"
00123
#endif
00124
00125
#endif