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);
127 itkGenericExceptionMacro(<<
"Unknown ScalarType" <<
typeid(
ScalarType).name());
133 virtual
void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
135 void OpenStream(std::ofstream & outputStream,
bool binary);
137 void CreateTransform(TransformPointer & ptr, const std::
string & ClassName);
139 std::
string m_FileName;
146 static inline const std::
string GetTypeNameString()
148 itkGenericExceptionMacro(<<
"Unknown ScalarType" <<
typeid(
ScalarType).name());
159 if(inputTransformName.find(
"float") == std::string::npos)
161 const std::string::size_type begin = inputTransformName.find(
"double");
162 inputTransformName.replace(begin, 6,
"float");
172 if(inputTransformName.find(
"double") == std::string::npos)
174 const std::string::size_type begin = inputTransformName.find(
"float");
175 inputTransformName.replace(begin, 5,
"double");
180 inline const std::string
184 return std::string(
"float");
188 inline const std::string
192 return std::string(
"double");
200 #ifndef ITK_MANUAL_INSTANTIATION
201 #include "itkTransformIOBase.hxx"
204 #endif // itkTransformIOBase_h
207 #ifndef ITK_TEMPLATE_EXPLICIT_TransformIOBase
216 # if defined( ITKIOTransformBase_EXPORTS )
218 # define ITKIOTransformBase_EXPORT_EXPLICIT ITK_FORWARD_EXPORT
221 # define ITKIOTransformBase_EXPORT_EXPLICIT ITKIOTransformBase_EXPORT
226 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
227 ITK_GCC_PRAGMA_DIAG_PUSH()
229 ITK_GCC_PRAGMA_DIAG(ignored
"-Wattributes")
234 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
235 ITK_GCC_PRAGMA_DIAG_POP()
237 ITK_GCC_PRAGMA_DIAG(warning
"-Wattributes")
241 # undef ITKIOTransformBase_EXPORT_EXPLICIT
itk::TransformIOBaseTemplate< double > TransformIOBase
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.