18 #ifndef itkTransformIOBase_h
19 #define itkTransformIOBase_h
21 #include "ITKIOTransformBaseExport.h"
30 #ifndef ITKIOTransformBase_TEMPLATE_EXPORT
31 #if defined(ITK_TEMPLATE_VISIBILITY_DEFAULT) || defined(__linux__) && defined(ITK_BUILD_SHARED_LIBS)
33 #define ITKIOTransformBase_TEMPLATE_EXPORT __attribute__ ((visibility ("default")))
35 #define ITKIOTransformBase_TEMPLATE_EXPORT
56 template<
typename TParametersValueType>
84 itkSetStringMacro(FileName);
85 itkGetStringMacro(FileName);
89 virtual void Read() = 0;
92 virtual void Write() = 0;
96 virtual bool CanReadFile(
const char *) = 0;
100 virtual bool CanWriteFile(
const char *) = 0;
109 void SetTransformList(ConstTransformListType & transformList);
112 itkSetMacro(AppendMode,
bool);
113 itkGetConstMacro(AppendMode,
bool);
114 itkBooleanMacro(AppendMode);
118 itkSetMacro(UseCompression,
bool);
119 itkGetConstMacro(UseCompression,
bool);
120 itkBooleanMacro(UseCompression);
133 itkGenericExceptionMacro(<<
"Unknown ScalarType" <<
typeid(
ScalarType).name());
139 void PrintSelf(std::ostream & os,
Indent indent)
const override;
141 void OpenStream(std::ofstream & outputStream,
bool binary);
143 void CreateTransform(TransformPointer & ptr,
const std::string & ClassName);
149 itkGenericExceptionMacro(<<
"Unknown ScalarType" <<
typeid(
ScalarType).name());
156 bool m_AppendMode{
false};
158 bool m_UseCompression{
false};
169 if(inputTransformName.find(
"float") == std::string::npos)
171 const std::string::size_type begin = inputTransformName.find(
"double");
172 inputTransformName.replace(begin, 6,
"float");
182 if(inputTransformName.find(
"double") == std::string::npos)
184 const std::string::size_type begin = inputTransformName.find(
"float");
185 inputTransformName.replace(begin, 5,
"double");
190 inline const std::string
194 return std::string(
"float");
198 inline const std::string
202 return std::string(
"double");
210 #endif // itkTransformIOBase_h
213 #ifndef ITK_TEMPLATE_EXPLICIT_TransformIOBase
222 # if defined( ITKIOTransformBase_EXPORTS )
224 # define ITKIOTransformBase_EXPORT_EXPLICIT ITK_FORWARD_EXPORT
227 # define ITKIOTransformBase_EXPORT_EXPLICIT ITKIOTransformBase_EXPORT
232 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
233 ITK_GCC_PRAGMA_DIAG_PUSH()
235 ITK_GCC_PRAGMA_DIAG(ignored
"-Wattributes")
240 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
241 ITK_GCC_PRAGMA_DIAG_POP()
243 ITK_GCC_PRAGMA_DIAG(warning
"-Wattributes")
247 # undef ITKIOTransformBase_EXPORT_EXPLICIT
Light weight base class for most itk classes.
template class ITKIOTransformBase_EXPORT_EXPLICIT TransformIOBaseTemplate< float >
template class ITKIOTransformBase_EXPORT_EXPLICIT TransformIOBaseTemplate< double >
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
Control indentation during Print() invocation.
Base class for most ITK classes.