[Insight-users] convert unsign int pixel type dicom file into MetaImage with gdcm

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu May 7 09:51:13 EDT 2009


No Word doc, please.
http://www.gnu.org/philosophy/no-word-attachments.html

On Thu, May 7, 2009 at 3:22 PM, Hsiang-Chi Kuo <kuoxgx at gmail.com> wrote:
> Hi  Mathieu,
> In case you didn't recieve the following email, I am forwording again.
>
> Hi  Mathieu,
> My previous report indicated the gdcmFile.cxx (1.28) and itkGDCMImageIO.cxx
> (1.59) worked fine.
> I applied dicomImageReadWrite.cxx example to read and rewrite the Dicom RT
> file, it did created new dicom RT file. However, the header of the file was
> different from my original dicom RT file. I used gdcmdump to check the
> header, except some instance UI and TM are different, the header did not get
> the correct (0018,1164), which is the x\y pixel spacing (the slice thickness
> is correct). Plus the  SQ was incorrect. The new file header returned
> (0008,2112), the "source image sequence", instead of the (300c,0002),
> the "Referenced RT Plan Sequence". I think the latter one was not allowed by
> my clinical application software, ie. I cannot import the new dicom Rt file
> into the software.
> Is there any way I can change the header ( I tried the
> DicomImageReadChangeHeaderWrite.cxx, there is an error message: Description:
> itk::ERROR: GDCMImageIO(014BE460): Cannot write the requested file:
> RT3D0.dcm
>
> Reason: No such file or directory) by inserting new tag (300c,0002) and its
> value, delete the (0008,2112), or copy the whole header of a dicom file
> (old) to another dicom file (new) so both of the files have the same header?

itk::GDCMImageIO will not load any Sequence (see documentation). So no
Sequence can appear in the output (except -of course- the Source Image
Sequence).

Open a bug report for the Imager Pixel Spacing, include code to
reproduce the issue. From the top of my head gdcm 1.x would always
duplicate the value of Pixel Spacing into Imager Pixel Spacing, I do
not understand why this would be wrong for you.

HTH
-- 
Mathieu


More information about the Insight-users mailing list