[Insight-users] Resample Filter

Luis Ibanez luis.ibanez at kitware.com
Fri Mar 28 10:56:44 EDT 2008


Hi Josiane,

         What Transform are you using ?

Some transforms have "fixed" parameters that are not included
in the array passed to the "SetParameters()" method.

For example, the Rigid and Affine transforms have a center
of rotation, that must be set, in order to be consistent
with the transform that you obtained during the registration
process.

It will also be useful if you (for debugging purposes only)
call first Update() in the resample filter itself.

This will allow us to differentiate whether the problem is
happening during the resampling or during the writing of the
resulting image.


   Please let us know,


      Thanks


         Luis



------------
Njiwa wrote:
> Hi every body,
> 
> I would like to use the transform parameters computed via the 
> registration framework called IterativeClosestPoint to apply on the 
> moving image and then write this image into a file. After getting the 
> transform, i used a resaple filter and then a writer. I could not write 
> the file properly and have an error message after execution which is: 
> Error while writting Slice to file
> Reason: Domain error
> 
> These are my code lines:
> 
> transform->SetParameters(
>       registration->GetLastTransformParameter() );
> resample->SetTransform(tranform);
> resample->SetInput(movingImageReader->GetOutput);
> resample->SetSize(fixedImage->GetLargestPossibleRegion().GetSize());
> resample->SetOutputOrigin(fixedImage->GetOrigin);
> resample->SetOutputSpacing(fixedImage->GetSpacing);
> resample->SetDefaultPixelValue(100);
> 
> typedef itk:ImageFileWriter<ImageType>WriterFixedType;
> WriterFixedType::Pointer  writer =WriterFixedType::New();
> writer->SetFilename(argv[6]);
> writer->SetInput(resample->GetOutput());
> 
> Should somebody helps me to solve this problem?
> Thanks a lot,
> 
> Josiane.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list