ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkDCMTKTransformIO.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 itkDCMTKTransformIO_h
19 #define itkDCMTKTransformIO_h
20 
21 #include "IOTransformDCMTKExport.h"
22 
23 #include "itkTransformIOBase.h"
24 
25 namespace itk
26 {
27 
36 template< typename TInternalComputationValueType >
37 class DCMTKTransformIO: public TransformIOBaseTemplate< TInternalComputationValueType >
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_ASSIGN(DCMTKTransformIO);
41 
45 
49 
52 
53  itkNewMacro( Self );
54 
57  bool CanReadFile(const char *) override;
58 
61  bool CanWriteFile(const char *) override;
62 
64  void Read() override;
65 
69  void Write() override;
70 
73  itkSetStringMacro( FrameOfReferenceUID );
74  itkGetStringMacro( FrameOfReferenceUID );
76 
77 protected:
79  ~DCMTKTransformIO() override;
80 
81 private:
82  std::string m_FrameOfReferenceUID;
83 };
84 
85 } // end namespace itk
86 
87 // Note: Explicit instantiation is done in itkDCMTKTransformIO.cxx
88 
89 #endif // itkDCMTKTransformIO_h
90 
91 #ifndef ITK_TEMPLATE_EXPLICIT_DCMTKTransformIO
92 // Explicit instantiation is required to ensure correct dynamic_cast
93 // behavior across shared libraries.
94 //
95 // IMPORTANT: Since within the same compilation unit,
96 // ITK_TEMPLATE_EXPLICIT_<classname> defined and undefined states
97 // need to be considered. This code *MUST* be *OUTSIDE* the header
98 // guards.
99 //
100 # if defined( IOTransformDCMTK_EXPORTS )
101 // We are building this library
102 # define IOTransformDCMTK_EXPORT_EXPLICIT
103 # else
104 // We are using this library
105 # define IOTransformDCMTK_EXPORT_EXPLICIT IOTransformDCMTK_EXPORT
106 # endif
107 namespace itk
108 {
109 
110 #if defined( __GNUC__ )
111 #pragma GCC diagnostic push
112 #pragma GCC diagnostic ignored "-Wattributes"
113 #endif
114 
117 
118 #if defined( __GNUC__ )
119 #pragma GCC diagnostic pop
120 #endif
121 
122 } // end namespace itk
123 # undef IOTransformDCMTK_EXPORT_EXPLICIT
124 #endif
Light weight base class for most itk classes.
bool CanReadFile(const char *) override
void Read() override
typename Superclass::ConstTransformListType ConstTransformListType
Abstract superclass defining the Transform IO interface.
Read transforms in DICOM format.
typename Superclass::TransformListType TransformListType
template class IOTransformDCMTK_EXPORT_EXPLICIT DCMTKTransformIO< double >
bool CanWriteFile(const char *) override
template class IOTransformDCMTK_EXPORT_EXPLICIT DCMTKTransformIO< float >
TransformBaseTemplate< ParametersValueType > TransformType
void Write() override
typename Superclass::TransformType TransformType
~DCMTKTransformIO() override
#define IOTransformDCMTK_EXPORT_EXPLICIT
Base class for most ITK classes.
Definition: itkObject.h:60