ITK  4.9.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 >
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 
86  virtual void SetInput(const InputImageType *image);
87  virtual void SetInput(unsigned int, const TInputImage *image);
88  const InputImageType * GetInput() const;
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() {}
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  ImageTransformer(const Self &) ITK_DELETE_FUNCTION;
247  void operator=(const Self &) ITK_DELETE_FUNCTION;
248 };
249 } // end namespace itk
250 
251 #ifndef ITK_MANUAL_INSTANTIATION
252 #include "itkImageTransformer.hxx"
253 #endif
254 
255 #endif
virtual void PushFrontInput(const DataObject *input)
static const unsigned int InputImageDimension
virtual void PopFrontInput() override
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
virtual void PushBackInput(const InputImageType *image)
SmartPointer< const Self > ConstPointer
#define ITK_THREAD_RETURN_TYPE
virtual void SetInput(const InputImageType *image)
virtual void ThreadedGenerateData(const InputImageRegionType &inputRegionForThread, ThreadIdType threadId)
DataObject::Pointer DataObjectPointer
virtual void PushFrontInput(const DataObject *input) override
virtual unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, InputImageRegionType &splitRegion)
virtual void PopBackInput() override
virtual void AfterThreadedGenerateData()
virtual void GenerateInputRequestedRegion() override
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
virtual void PushBackInput(const DataObject *input)
Push/Pop an indexed input of this process object.
virtual void AllocateOutputs()
SmartPointer< Self > Pointer
virtual void PushFrontInput(const InputImageType *image)
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
InputImageType::RegionType InputImageRegionType
static ITK_THREAD_RETURN_TYPE ThreaderCallback(void *arg)
Base class for all process objects that transform an image into something else.
const InputImageType * GetInput() const
InputImageType::PixelType InputImagePixelType
virtual void GenerateData() override
virtual void BeforeThreadedGenerateData()
InputImageType::Pointer InputImagePointer
Base class for all data objects in ITK.
virtual void PushBackInput(const DataObject *input) override