Hi Mathieu ;-)<br><br><br>Thank you, I think it's really what I need.<br><br><br><br>Have a nice day,<br><br><br>Stéphane<br><br><br><br><div class="gmail_quote">2008/10/24 Mathieu Malaterre <span dir="ltr"><<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">On Fri, Oct 24, 2008 at 10:12 AM, Stéphane CALANDE <<a href="mailto:scalande@gmail.com">scalande@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
><br>
> I hope you'll be able to help me !<br>
><br>
> I have :<br>
><br>
>> one DICOM image (2D)<br>
>> one MHD/RAW image (2D)<br>
> (these images have the same resolution (size, spacing,...)<br>
><br>
> My question is the following one :<br>
><br>
> How can I replace the part of the DICOM file that represents the pixels<br>
> matrix by the RAW file ?<br>
> So I want to change the pixels of DICOM but I don't won't to change the<br>
> patient characteristics...<br>
><br>
><br>
> Does something exist to do that easily ?<br>
><br>
><br>
<br>
</div></div>7.12.2 Reading and Writing a 2D Image<br>
<br>
...<br>
We now need to explicitly set the proper image IO (GDCMImageIO), but<br>
also we must tell<br>
the ImageFileWriter to not use the MetaDataDictionary from the input<br>
but from the GDCMImageIO<br>
since this is the one that contains the DICOM specific information<br>
The GDCMImageIO object will automatically detect the pixel type, in<br>
this case unsigned<br>
char and it will update the DICOM header information accordingly.<br>
...<br>
<br>
<br>
You can even manually change any tab you do not like, or that must be<br>
updated, have a look at ImageReadDicomSeriesWrite.cxx<br>
<br>
(for some reason I cannot find it in the ItkSoftwareGuide, must have<br>
been added after the latest pdf generation).<br>
<br>
HTH<br>
--<br>
<font color="#888888">Mathieu<br>
</font></blockquote></div><br>