<div dir="ltr"><div>Folks,<br><br></div>When I compile the following code I get this compilation error:<br><br>/home/lorensen/ProjectsGIT/ITKGerrit/Modules/Remote/WikiExamples/IO/TransformFileWriter.cxx: In function ‘int main(int, char**)’:<br>
/home/lorensen/ProjectsGIT/ITKGerrit/Modules/Remote/WikiExamples/IO/TransformFileWriter.cxx:20: error: no matching function for call to ‘itk::TransformFileWriterTemplate<double>::SetInput(itk::SmartPointer<itk::Rigid2DTransform<float> >&)’<br>
/home/lorensen/ProjectsGIT/ITKGerrit/Modules/IO/TransformBase/include/itkTransformFileWriter.hxx:78: note: candidates are: void itk::TransformFileWriterTemplate<ScalarType>::SetInput(const itk::TransformBaseTemplate<TScalarType>*) [with ScalarType = double]<br>
<br>---------------------------------------------------------------------------------------------------<br>#include "itkRigid2DTransform.h"<br>#include "itkTransformFileWriter.h"<br><br>int main(int argc, char *argv[])<br>
{<br> std::string fileName;<br> if(argc == 1) // No arguments were provided<br> {<br> fileName = "test.tfm";<br> }<br> else<br> {<br> fileName = argv[1];<br> }<br><br> typedef itk::Rigid2DTransform< float > TransformType;<br>
TransformType::Pointer transform = TransformType::New();<br><br> itk::TransformFileWriter::Pointer writer = itk::TransformFileWriter::New();<br> writer->SetInput(transform);<br> writer->SetFileName(fileName);<br>
writer->Update();<br><br> return EXIT_SUCCESS;<br>}<br><br></div>