[ITK-users] [ITK Community] [Insight-users] Volume GDCM reading writing

Luis Ibanez luis.ibanez at kitware.com
Wed Mar 19 09:25:16 EDT 2014


Guillaume,

Just to close the loop, here is the thread of this question
in the ITK Community list:

http://public.kitware.com/pipermail/community/2014-March/001840.html


   Thanks

      Luis



On Mon, Mar 17, 2014 at 10:56 AM, g.lemaitre58 <g.lemaitre58 at gmail.com>wrote:

> 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 a problem of orientation and origin when saving the output of
> resampler into a DICOM series. I could observe that the problem (if there
> is
> one) is that GDCM will consider the last image of my serie as the origin
> (and with a reverse orientation). When opening the original serie and the
> saved serie in itk-snap, the origin is then swap from the first to the last
> image and the orientation is up side down.
>
> What should be the correct way to solve this problem.
>
> Best regards,
>
> Guillaume
>
>
>
> --
> View this message in context:
> http://itk-users.7.n7.nabble.com/Volume-GDCM-reading-writing-tp33579.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140319/f127baa5/attachment.html>


More information about the Insight-users mailing list