[ITK Community] Resampling and origin patient for DICOM files
Guillaume Lemaître
g.lemaitre58 at gmail.com
Mon Mar 17 07:38:25 EDT 2014
Hi all,
I am currently working on the following task. I got two DICOM series from
different modality with different spacing, and origin. A third DICOM serie
correspond to binary segmentation of one the previous serie. I would like
to "project" this segmentation into the other serie. I think that the
resampling filter should make this work quite well. It should look
something like that:
ResampleFilterType::Pointer resampler = ResampleFilterType::New();
resampler->SetInput( maskVolume->GetOutput() );
resampler->SetTransform( transform );
resampler->SetInterpolator( interpolator );
resampler->SetOutputOrigin( targetVolume->GetOutput()->GetOrigin() );
resampler->SetOutputSpacing( targetVolume->GetOutput()->GetSpacing() );
resampler->SetOutputDirection( targetVolume->GetOutput()->GetDirection()
);
resampler->SetSize(
targetVolume->GetOutput()->GetLargestPossibleRegion().GetSize() );
resampler->Update();
However, I got trapped with what seems to be a problem of origin. I search
around and different discussions and got quite confused. From what I found
is the following:
Using gdcminfo to read the origin of targetVolume will give me the same
information than the tag (0020,0032) of the DICOM header. However, it will
be different from targetVolume->GetOuput()->GetOrigin() which imply a shift
when saving my data later.
What should the proper way to do such task?
Thanks in advance,
Best regards,
--
*LEMAÎTRE GuillaumePhD CandiateMSc Erasmus Mundus ViBOT (Vision-roBOTic)MSc
Business Innovation and Technology Management (in progress)*
g.lemaitre58 at gmail.com
*ViCOROB - Computer Vision and Robotic Team*
Universitat de Girona, Campus Montilivi, Edifici P-IV 17071 Girona
Tel. +34 972 41 98 12 - Fax. +34 972 41 82 59
http://vicorob.udg.es/
*LE2I - Le Creusot*IUT Le Creusot, Laboratoire LE2I, 12 rue de la Fonderie,
71200 Le Creusot
Tel. +33 3 85 73 10 90 - Fax. +33 3 85 73 10 97
http://le2i.cnrs.fr
https://sites.google.com/site/glemaitre58/
Vice - Chairman of A.S.C. Fours UFOLEP
Chairman of A.S.C. Fours FFC
Webmaster of http://ascfours.free.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140317/e7cc9c67/attachment-0001.html>
More information about the Community
mailing list