go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxTransformixFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
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 elxTransformixFilter_h
19 #define elxTransformixFilter_h
20 
21 #include "itkImageSource.h"
22 
23 #include "elxTransformixMain.h"
24 #include "elxParameterObject.h"
25 #include "elxPixelType.h"
26 
32 namespace elastix
33 {
34 
35 template< typename TMovingImage >
36 class ELASTIXLIB_API TransformixFilter : public itk::ImageSource< TMovingImage >
37 {
38 public:
39 
42  typedef itk::ImageSource< TMovingImage > Superclass;
43  typedef itk::SmartPointer< Self > Pointer;
44  typedef itk::SmartPointer< const Self > ConstPointer;
45 
47  itkNewMacro( Self );
48 
50  itkTypeMacro( Self, itk::ImageSource );
51 
56  typedef ArgumentMapType::value_type ArgumentMapEntryType;
57 
58  typedef itk::ProcessObject::DataObjectPointer DataObjectPointer;
59  typedef itk::ProcessObject::DataObjectIdentifierType DataObjectIdentifierType;
62 
69 
70  typedef typename itk::Image< itk::Vector< float, TMovingImage::ImageDimension >,
71  TMovingImage::ImageDimension > OutputDeformationFieldType;
72 
73  typedef typename TMovingImage::Pointer InputImagePointer;
74  typedef typename TMovingImage::ConstPointer InputImageConstPointer;
75 
76  itkStaticConstMacro( MovingImageDimension, unsigned int, TMovingImage::ImageDimension );
77 
79  virtual void SetMovingImage( TMovingImage * inputImage );
80  InputImageConstPointer GetMovingImage( void );
81  virtual void RemoveMovingImage( void );
82 
84  itkSetMacro( FixedPointSetFileName, std::string );
85  itkGetMacro( FixedPointSetFileName, std::string );
86  virtual void RemoveFixedPointSetFileName() { this->SetFixedPointSetFileName( "" ); }
87 
89  itkSetMacro( ComputeSpatialJacobian, bool );
90  itkGetConstMacro( ComputeSpatialJacobian, bool );
91  itkBooleanMacro( ComputeSpatialJacobian );
92 
94  itkSetMacro( ComputeDeterminantOfSpatialJacobian, bool );
95  itkGetConstMacro( ComputeDeterminantOfSpatialJacobian, bool );
96  itkBooleanMacro( ComputeDeterminantOfSpatialJacobian );
97 
99  itkSetMacro( ComputeDeformationField, bool );
100  itkGetConstMacro( ComputeDeformationField, bool );
101  itkBooleanMacro( ComputeDeformationField );
102 
104  virtual void SetTransformParameterObject( ParameterObjectPointer transformParameterObject );
105 
106  ParameterObjectType * GetTransformParameterObject( void );
107 
108  const ParameterObjectType * GetTransformParameterObject( void ) const;
109 
110  OutputDeformationFieldType * GetOutputDeformationField( void );
111 
112  const OutputDeformationFieldType * GetOutputDeformationField( void ) const;
113 
115  itkSetMacro( OutputDirectory, std::string );
116  itkGetConstMacro( OutputDirectory, std::string );
117  virtual void RemoveOutputDirectory() { this->SetOutputDirectory( "" ); }
118 
120  virtual void SetLogFileName( std::string logFileName );
121 
122  itkGetConstMacro( LogFileName, std::string );
123  virtual void RemoveLogFileName( void );
124 
126  itkSetMacro( LogToConsole, bool );
127  itkGetConstMacro( LogToConsole, bool );
128  itkBooleanMacro( LogToConsole );
129 
131  itkSetMacro( LogToFile, bool );
132  itkGetConstMacro( LogToFile, bool );
133  itkBooleanMacro( LogToFile );
134 
136  virtual DataObjectPointer MakeOutput( const DataObjectIdentifierType & key ) ITK_OVERRIDE;
137 
138 protected:
139 
140  TransformixFilter( void );
141 
142  virtual void GenerateData( void ) ITK_OVERRIDE;
143 
144 private:
145 
146  TransformixFilter( const Self & ); // purposely not implemented
147  void operator=( const Self & ); // purposely not implemented
148 
150  virtual bool IsEmpty( const InputImagePointer inputImage );
151 
153  virtual void VerifyInputInformation( void ) ITK_OVERRIDE {};
154 
157  using itk::ProcessObject::SetInput;
158  using itk::ProcessObject::GetInput;
159  using itk::ProcessObject::RemoveInput;
160 
165 
166  std::string m_OutputDirectory;
167  std::string m_LogFileName;
168 
171 
172 };
173 
174 } // namespace elx
175 
176 #ifndef ITK_MANUAL_INSTANTIATION
177 #include "elxTransformixFilter.hxx"
178 #endif
179 
180 #endif // elxTransformixFilter_h
itk::SmartPointer< Self > Pointer
itk::SmartPointer< const Self > ConstPointer
ParameterObjectType::ParameterMapType ParameterMapType
elastix::TransformixMain TransformixMainType
Superclass::DataObjectContainerType DataObjectContainerType
itk::ImageSource< TMovingImage > Superclass
TMovingImage::Pointer InputImagePointer
itk::ProcessObject::DataObjectPointer DataObjectPointer
ParameterObjectType::Pointer ParameterObjectPointer
itk::SmartPointer< Self > Pointer
virtual void RemoveFixedPointSetFileName()
itk::SmartPointer< Self > Pointer
ArgumentMapType::value_type ArgumentMapEntryType
itk::SmartPointer< const Self > ConstPointer
TransformixMainType::DataObjectContainerType DataObjectContainerType
itk::ProcessObject::DataObjectIdentifierType DataObjectIdentifierType
ParameterObjectType::ConstPointer ParameterObjectConstPointer
TransformixMainType::DataObjectContainerPointer DataObjectContainerPointer
itk::Image< itk::Vector< float, TMovingImage::ImageDimension >, TMovingImage::ImageDimension > OutputDeformationFieldType
std::vector< ParameterValueType > ParameterValueVectorType
ParameterObjectType::ParameterMapVectorType ParameterMapVectorType
Superclass::ArgumentMapType ArgumentMapType
ParameterObjectType::ParameterValueVectorType ParameterValueVectorType
TransformixMainType::ArgumentMapType ArgumentMapType
TransformixMainType::Pointer TransformixMainPointer
Superclass::DataObjectContainerPointer DataObjectContainerPointer
#define ELASTIXLIB_API
Definition: elxMacro.h:301
std::map< ParameterKeyType, ParameterValueVectorType > ParameterMapType
TMovingImage::ConstPointer InputImageConstPointer
A class with all functionality to configure transformix.
std::vector< ParameterMapType > ParameterMapVectorType
virtual void VerifyInputInformation(void) ITK_OVERRIDE


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.13 elastix logo