<br>With regard to reading a transform file, using itk::TransformFileReader, given the example:<br><span style="font-family: courier new,monospace;">examples/IO/TransformReadWrite.cxx</span><br style="font-family: courier new,monospace;">
<br>This example uses the following code to register and read a known BSplineTransformType, i.e.:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">typedef itk::BSplineDeformableTransform<double,3,5> BSplineTransformType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">...</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">itk::TransformFileReader::Pointer reader;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> reader = itk::TransformFileReader::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">// Some transforms (like the BSpline transform) might not be registered </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> // with the factory so we add them manually. </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">itk::TransformFactory<BSplineTransformType>::RegisterTransform();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">reader->SetFileName( "Transforms.meta" );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">try</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> reader->Update();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> catch( itk::ExceptionObject & excp )</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> std::cerr << "Error while reading the transform file" << std::endl;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> std::cerr << excp << std::endl;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> std::cerr << "[FAILED]" << std::endl;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> return EXIT_FAILURE;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;">
<br><br>Now let's assume a transform file contains an unknown transform type.<br><br>What is the role of the transform factory? Is it required to read a transform file? Is it possible to read a unknown transform file and register a given transform type with the transform factory after reading the file?<br>
<br>Suppose the transform file contains a BSplineTransformType, but the parameters are unknown. Is it possible to read this transform file?<br><br>TIA and take care,<br>Darren<br><br>