ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkRegionOfInterestImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkRegionOfInterestImageFilter_h
19 #define __itkRegionOfInterestImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkSmartPointer.h"
23 
24 namespace itk
25 {
52 template< typename TInputImage, typename TOutputImage >
54  public ImageToImageFilter< TInputImage, TOutputImage >
55 {
56 public:
63 
65  itkNewMacro(Self);
66 
69 
71  typedef typename TInputImage::RegionType RegionType;
72  typedef typename TInputImage::IndexType IndexType;
73  typedef typename TInputImage::SizeType SizeType;
74 
76  typedef typename TOutputImage::PixelType OutputImagePixelType;
77  typedef typename TInputImage::PixelType InputImagePixelType;
78 
80  itkSetMacro(RegionOfInterest, RegionType);
81  itkGetConstMacro(RegionOfInterest, RegionType);
83 
85  itkStaticConstMacro(ImageDimension, unsigned int,
86  TInputImage::ImageDimension);
87  itkStaticConstMacro(OutputImageDimension, unsigned int,
88  TOutputImage::ImageDimension);
90 
91 #ifdef ITK_USE_CONCEPT_CHECKING
92  // Begin concept checking
93  itkConceptMacro( SameDimensionCheck,
95  itkConceptMacro( InputConvertibleToOutputCheck,
97  // End concept checking
98 #endif
99 
100 protected:
103  void PrintSelf(std::ostream & os, Indent indent) const;
104 
105  virtual void GenerateInputRequestedRegion();
106 
107  virtual void EnlargeOutputRequestedRegion(DataObject *output);
108 
117  virtual void GenerateOutputInformation();
118 
128  void ThreadedGenerateData(const RegionType & outputRegionForThread,
129  ThreadIdType threadId);
130 
131 private:
132  RegionOfInterestImageFilter(const Self &); //purposely not implemented
133  void operator=(const Self &); //purposely not implemented
134 
136 };
137 } // end namespace itk
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkRegionOfInterestImageFilter.hxx"
141 #endif
142 
143 #endif
virtual void EnlargeOutputRequestedRegion(DataObject *output)
virtual void GenerateInputRequestedRegion()
void ThreadedGenerateData(const RegionType &outputRegionForThread, ThreadIdType threadId)
virtual void GenerateOutputInformation()
void PrintSelf(std::ostream &os, Indent indent) const
Superclass::InputImageRegionType InputImageRegionType
Base class for all process objects that output image data.
InputImageType::RegionType InputImageRegionType
Extract a region of interest from the input image.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageToImageFilter< TInputImage, TOutputImage > Superclass
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159