ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkImageTransformer.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 /*=========================================================================
19  *
20  * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21  *
22  * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23  *
24  * For complete copyright, license and disclaimer of warranty information
25  * please refer to the NOTICE file at the top of the ITK source tree.
26  *
27  *=========================================================================*/
28 #ifndef itkImageTransformer_h
29 #define itkImageTransformer_h
30 
31 #include "itkProcessObject.h"
32 #include "itkImage.h"
33 
34 namespace itk
35 {
58 template< typename TInputImage >
59 class ITK_TEMPLATE_EXPORT ImageTransformer:public ProcessObject
60 {
61 public:
67 
70 
73 
75  typedef TInputImage InputImageType;
76  typedef typename InputImageType::Pointer InputImagePointer;
77  typedef typename InputImageType::RegionType InputImageRegionType;
78  typedef typename InputImageType::PixelType InputImagePixelType;
79 
81  itkStaticConstMacro(InputImageDimension, unsigned int,
82  TInputImage::ImageDimension);
83 
85  using Superclass::SetInput;
86  virtual void SetInput(const InputImageType *image);
87  virtual void SetInput(unsigned int, const TInputImage *image);
88  const InputImageType * GetInput() const;
89  InputImageType * GetInput();
90  const InputImageType * GetInput(unsigned int idx) const;
92 
112  virtual void PushBackInput(const InputImageType *image);
113  virtual void PopBackInput() ITK_OVERRIDE;
114  virtual void PushFrontInput(const InputImageType *image);
115  virtual void PopFrontInput() ITK_OVERRIDE;
117 
118 protected:
120  virtual ~ImageTransformer() ITK_OVERRIDE {}
121 
135  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
136 
152  virtual void GenerateData() ITK_OVERRIDE;
153 
176  virtual
177  void ThreadedGenerateData(const InputImageRegionType & inputRegionForThread,
178  ThreadIdType threadId);
179 
185  virtual void AllocateOutputs();
186 
197  virtual void BeforeThreadedGenerateData() {}
198 
209  virtual void AfterThreadedGenerateData() {}
210 
216  virtual
217  unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, InputImageRegionType & splitRegion);
218 
222  static ITK_THREAD_RETURN_TYPE ThreaderCallback(void *arg);
223 
233  virtual void PushBackInput(const DataObject *input) ITK_OVERRIDE
234  { Superclass::PushBackInput(input); }
235  virtual void PushFrontInput(const DataObject *input) ITK_OVERRIDE
236  { Superclass::PushFrontInput(input); }
238 
241  struct ThreadStruct {
243  };
244 
245 private:
246  ITK_DISALLOW_COPY_AND_ASSIGN(ImageTransformer);
247 };
248 } // end namespace itk
249 
250 #ifndef ITK_MANUAL_INSTANTIATION
251 #include "itkImageTransformer.hxx"
252 #endif
253 
254 #endif
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
SmartPointer< const Self > ConstPointer
#define ITK_THREAD_RETURN_TYPE
DataObject::Pointer DataObjectPointer
virtual void PushFrontInput(const DataObject *input) override
virtual void AfterThreadedGenerateData()
SmartPointer< Self > Pointer
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
InputImageType::RegionType InputImageRegionType
Base class for all process objects that transform an image into something else.
InputImageType::PixelType InputImagePixelType
InputImageType::Pointer InputImagePointer
Base class for all data objects in ITK.
virtual void PushBackInput(const DataObject *input) override