Hey everyone, first timer here.<br><br>I have three sets of images, each are comprised of multiple images with exactly the same matrix size, actual size, orientation, etc. What I can do is to to register a single image from each set to each other. But rather than register every image to every image, I would like to effectively save the transform as a file and then run a separate program individually to apply the transform to the later images. It seems like something that probably has been done before, but I can't find anything.
<br><br>It appears that a transform is fully determined by the matrix, offset, size, origin, and spacing. Those I can easily save to a text file, and the reading of the file is relatively straightforward as well. The problem is actually setting the numbers.
<br> <br><br> TransformType::MatrixType mat;<br> TransformType::OffsetType offset;<br> OutputImageType::SizeType size;<br> double origin[3];<br> double spacing[3];<br><br>read text file and populate the arrays<br><br>
finalTransform->SetMatrix( mat );<br> finalTransform->SetOffset( offset );<br> resample->SetSize( size );<br> resample->SetOutputOrigin( origin );<br> resample->SetOutputSpacing( spacing );<br><br><br>
I think everything here except the matrix would work like this (but please correct me if I am wrong), so my question is how can I set the matrix for the transform?<br><br>Many thanks,<br>Eric<br><br><br>