[Insight-users] Volume GDCM reading writing

g.lemaitre58 g.lemaitre58 at gmail.com
Mon Mar 17 10:56:03 EDT 2014


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.


More information about the Insight-users mailing list