[Insight-users] Is it a bug in registration framework??

Laurent PAUL Laurent.Paul at orto.ucl.ac.be
Tue Feb 6 11:40:51 EST 2007


As long as the subject is opened, I have another (minor) problem with
registration.
I'd want to feed it Dicom and export transformed volume as Dicom.
My program crashes when the writer is updated, but with no ITK reason...
So what I do ( a tricky thing!), is that I run the registration process,
export the transform in a txt file, and run a second progam which imports
the transform and apply it on the volume.
It works but.... not so much elegant :-(

This is my code:


typedef itk::ResampleImageFilter< ImageType, ImageType >
ResampleFilterType;
ResampleFilterType::Pointer resample = ResampleFilterType::New();
resample->SetInput( MovingImage );
resample->SetTransform( registration->GetTransform() );
resample->SetSize( size );//size from FixedImage
resample->SetOutputOrigin(  FixedImage->GetOrigin() );
resample->SetOutputSpacing( spacing );//spacing from FixedImage
resample->SetDefaultPixelValue( 0 );

typedef itk::ImageSeriesWriter < ImageType, OutputImageType >  WriterType;
WriterType::Pointer      writer =  WriterType::New();
typedef itk::NumericSeriesFileNames OutputNamesGeneratorType;
OutputNamesGeneratorType::Pointer OutputNamesGenerator =
OutputNamesGeneratorType::New();

OutputNamesGenerator->SetStartIndex(1);
OutputNamesGenerator->SetEndIndex( size[2]);
OutputNamesGenerator->SetSeriesFormat(directory);

writer->SetInput( resample->GetOutput() );
writer->SetImageIO( FixedGdcmIO );
writer->SetFileNames(OutputNamesGenerator->GetFileNames());
writer->SetMetaDataDictionaryArray( DicomDictionaryArray); //DicomArray
from FixedDicomReader

try
{
  writer->Update();
}
catch( itk::ExceptionObject & err )
{
    std::cout << "ExceptionObject on writer->Update()" << std::endl;
std::cout << err << std::endl;
    return 1;
}

Any suggestion?

Thanks,

Laurent.



>
> Hi Laurent,
>
> The family of Transform was reorganized before the release of ITK 2.8.
>
> In particular, the use of the Centered transforms was affected.
>
> We will need more details about your registration setup in order to give
you further advice.
>
>
>
>     Regards,
>
>
>        Luis
>
>
>
> --------------------
> Laurent PAUL wrote:
>> Hi users,
>> I'm using ITK registration framework for a while now, and so far, it
worked great.
>> Since I upgrade my ITK build to 2.8.1, I had problems with the
>> framework.
>> I built the same source code from ITK 1.8.0, ITK 2.0 and ITK 2.8.1. I
ran the program with the corresponding ITKCommon.dll and had
different
>> results.
>> With ITK 1.8.0 and 2.0, registration converged and gave me an excellent
result.
>> With 2.8.1, registration stopped because volumes weren't overlapping
anymore...
>> What's the matter with this release?
>> I did not try with the new 3.0 release, and so don't know if this behavior
>> was corrected.
>> These are the components I use:
>> itkImageRegistrationMethod.h
>> itkVersorRigid3DTransform.h
>> itkVersorRigid3DTransformOptimizer.h
>> itkCenteredVersorTransformInitializer.h
>> itkMeanSquaresImageToImageMetric.h
>> itkLinearInterpolateImageFunction.h
>> itkResampleImageFilter.h
>> Let me know if a bug report is necessary... or if I missed something
new
>> in newer releases.
>> Thanks,
>> Laurent.
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>


-----------------------------------
PAUL Laurent.
Université Catholique de Louvain (UCL)
University Hospital Saint-Luc
Orthopaedic Laboratory
avenue Mounier, 53
Pasteur Tower +4
1200 BRUSSELS

tél:(0032) 2 764 93 88
----------------------------------






More information about the Insight-users mailing list