38 const std::string &ClassName)
41 itkDebugMacro (
"About to call ObjectFactory" );
44 itkDebugMacro (
"After call ObjectFactory");
49 msg <<
"Could not create an instance of " << ClassName << std::endl
50 <<
"The usual cause of this error is not registering the "
51 <<
"transform with TransformFactory" << std::endl;
52 msg <<
"Currently registered Transforms: " << std::endl;
54 std::list<std::string>::iterator it;
55 for ( it = names.begin(); it != names.end(); it++ )
57 msg <<
"\t\"" << *it <<
"\"" << std::endl;
59 itkExceptionMacro ( << msg.str() );
69 if (this->m_AppendMode)
71 std::ofstream tFile(m_FileName.c_str(),std::ios::out | std::ios::app);
76 std::ofstream tFile(m_FileName.c_str(),std::ios::out);
80 std::ios::openmode mode(std::ios::out);
83 mode |= std::ios::binary;
85 if (this->m_AppendMode)
87 mode |= std::ios::app;
90 outputStream.open(m_FileName.c_str(), mode);
92 if( outputStream.fail() )
95 itkExceptionMacro(
"Failed opening file" << m_FileName );
108 os << indent <<
"FileName: " <<
m_FileName << std::endl;
109 os << indent <<
"AppendMode: " <<
113 os << indent <<
"ReadTransformList: " << std::endl;
123 os << indent <<
"WriteTransformList: " << std::endl;