<div dir="ltr">Guillaume,<div><br></div><div>Just to close the loop, here is the thread of this question</div><div>in the ITK Community list:</div><div><br></div><div><a href="http://public.kitware.com/pipermail/community/2014-March/001840.html">http://public.kitware.com/pipermail/community/2014-March/001840.html</a><br>
</div><div><br></div><div><br></div><div> Thanks</div><div><br></div><div> Luis</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 17, 2014 at 10:56 AM, g.lemaitre58 <span dir="ltr"><<a href="mailto:g.lemaitre58@gmail.com" target="_blank">g.lemaitre58@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am currently working on the following task. I got two DICOM series from<br>
different modality with different spacing, and origin. A third DICOM serie<br>
correspond to binary segmentation of one the previous serie. I would like to<br>
"project" this segmentation into the other serie. I think that the<br>
resampling filter should make this work quite well. It should look something<br>
like that:<br>
<br>
ResampleFilterType::Pointer resampler = ResampleFilterType::New();<br>
resampler->SetInput( maskVolume->GetOutput() );<br>
resampler->SetTransform( transform );<br>
resampler->SetInterpolator( interpolator );<br>
resampler->SetOutputOrigin( targetVolume->GetOutput()->GetOrigin() );<br>
resampler->SetOutputSpacing( targetVolume->GetOutput()->GetSpacing() );<br>
resampler->SetOutputDirection( targetVolume->GetOutput()->GetDirection()<br>
);<br>
resampler->SetSize(<br>
targetVolume->GetOutput()->GetLargestPossibleRegion().GetSize() );<br>
resampler->Update();<br>
<br>
However I got a problem of orientation and origin when saving the output of<br>
resampler into a DICOM series. I could observe that the problem (if there is<br>
one) is that GDCM will consider the last image of my serie as the origin<br>
(and with a reverse orientation). When opening the original serie and the<br>
saved serie in itk-snap, the origin is then swap from the first to the last<br>
image and the orientation is up side down.<br>
<br>
What should be the correct way to solve this problem.<br>
<br>
Best regards,<br>
<br>
Guillaume<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-users.7.n7.nabble.com/Volume-GDCM-reading-writing-tp33579.html" target="_blank">http://itk-users.7.n7.nabble.com/Volume-GDCM-reading-writing-tp33579.html</a><br>
Sent from the ITK - Users mailing list archive at Nabble.com.<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
</blockquote></div><br></div>