[ITK Community] [Insight-users] [Insight-developers] Incorrect origin and spacing when converting DICOM to metaimage
Mengda Wu
wumengda at gmail.com
Mon Nov 11 11:10:59 EST 2013
Hi Norman,
Thanks for the suggestion. I also tried DCMTK but it does not work.
There are a lot of errors relating svd calculations. I think it has some
issues when computing the orientation matrix.
Supprisingly, when I tried to link with ITK-3.20.1, the meta image has
the correct orientation and spacing. I don't know why ITK v4 or the newer
version of GDCM in it causes this problem.
Thanks,
Mengda
On Mon, Nov 11, 2013 at 10:40 AM, Williams, Norman K <
norman-k-williams at uiowa.edu> wrote:
> Try using DCMTKImageIO instead. This needs to be turned on when you
> configure and build ITK.
>
> Module_ITKDCMTK:BOOL=ON
> Module_ITKIODCMTK:BOOL=ON
> GDCM has some issues with reading DICOM files. These may or may not be
> addressed with a more recent version of GDCM; the last time I tried using
> a current version of GDCM I couldn't get ITK to build with it.
>
> --
> Kent Williams norman-k-williams at uiowa.edu
>
>
>
>
>
>
> On 11/11/13 9:22 AM, "Mengda Wu" <wumengda at gmail.com> wrote:
>
> >BTW, here is what I got by running gdcminfo (gdcm version 2.4.0) on one
> >of the dicoms:
> >======================================================================
> >MediaStorage is 1.2.840.10008.5.1.4.1.1.7 [Secondary Capture Image
> >Storage]
> >TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]
> >NumberOfDimensions: 2
> >Dimensions: (512,512,1)
> >SamplesPerPixel :1
> >BitsAllocated :16
> >BitsStored :16
> >HighBit :15
> >PixelRepresentation:1
> >ScalarType found :INT16
> >PhotometricInterpretation: MONOCHROME2
> >PlanarConfiguration: 0
> >TransferSyntax: 1.2.840.10008.1.2.1
> >Origin: (0,0,0)
> >Spacing: (1,1,1)
> >DirectionCosines: (1,0,0,0,1,0)
> >Rescale Intercept/Slope: (-1024,1)
> >Orientation Label: AXIAL
> >=======================================================================
> >
> >
> >Clearly, from
> >(0018,0088)=0.449999988
> >
> >(0028,0030)=0.400391012\0.400391012
> >
> >The spacing should not be (1,1,1).
> >
> >Thanks,
> >Mengda
> >
> >
> >
> >
> >
> >On Mon, Nov 11, 2013 at 10:14 AM, Mengda Wu
> ><wumengda at gmail.com> wrote:
> >
> >Hi all,
> >
> > I have some dicom images in my new project. But when I tried to convert
> >them to the ITK metaimages, the origin and spacing are incorrect even
> >though the intensities are right. The origin becomes (0,0,0) and spacing
> >is (1,1,1). I am the example
> >DicomSeriesReadImageWrite2.cxx
> ><
> http://itk.org/gitweb?p=ITK.git;a=blob_plain;f=Examples/IO/DicomSeriesRea
> >dImageWrite2.cxx;hb=HEAD>
> >
> >
> >
> >from ITK 4.4.2. The code does not have any issue with other Dicoms for my
> >previous projects. so my guess is the current dicoms miss some fields in
> >the header that ITK needs.
> >
> >
> >Can you help? I am attaching the fields from one dicom as follows:
> >
> >(0002,0000) Group Length
> >Value: 206
> >(0002,0001) File Meta Information Version
> >Value: 0
> >(0002,0002) Media Storage SOP Class UID
> >Value: 1.2.840.10008.5.1.4.1.1.7
> >(0002,0003) Media Storage SOP Instance UID
> >Value: 1.2.276.0.28.3.2418833.1095761920.42.5040.2012041216272628700
> >(0002,0010) Transfer Syntax UID
> >Value: 1.2.840.10008.1.2.1
> >(0002,0012) Implementation Class UID
> >Value: 1.2.276.0.7230010.3.0.3.6.0
> >(0002,0013) Implementation Version Name
> >Value: OFFIS_DCMTK_360
> >
> >(0008,0008) Image Type
> >Value: DERIVED\SECONDARY\REFORMATTED
> >
> >(0008,0016) SOP Class UID
> >Value: 1.2.840.10008.5.1.4.1.1.7
> >(0008,0018) SOP Instance UID
> >Value: 1.2.276.0.28.3.2418833.1095761920.42.5040.2012041216272628700
> >(0008,0020) Study Date
> >(0008,0022) Acquisition Date
> >Value: 20120116
> >(0008,0023) Image Date
> >Value: 20120116
> >(0008,0030) Study Time
> >(0008,0033) Image Time
> >Value: 120859.658000
> >
> >(0008,0050) Accession Number
> >(0008,0060) Modality
> >Value: CT
> >(0008,0070) Manufacturer
> >Value: Philips
> >
> >(0008,0080) Institution Name
> >Value: Hide
> >(0008,0090) Referring Physician's Name
> >(0008,103E) Series Description
> >Value: Hide
> >(0008,1090) Manufacturer's Model Name
> >Value: Brillance 64
> >(0010,0010) Patient's Name
> >Value: Patient00
> >(0010,0020) Patient ID
> >(0010,0030) Patient's Birth Date
> >Value: NewDOB16
> >(0010,0040) Patient's Sex
> >Value: F
> >(0010,1010) Patient's Age
> >Value: 054Y
> >(0018,0088) Spacing Between Slices
> >Value: 0.449999988
> >
> >(0018,1151) X-ray Tube Current
> >Value: 429
> >(0020,000D) Study Instance UID
> >Value: 1.2.276.0.28.3.2418833.1095761920.42.3628.2012011611085965900
> >(0020,000E) Series Instance UID
> >Value: 1.2.276.0.28.3.2418833.1095761920.42.3628.2012011611085965901
> >(0020,0010) Study ID
> >(0020,0011) Series Number
> >(0020,0013) Image Number
> >Value: 1
> >(0020,0020) Patient Orientation
> >(0020,0032) Image Position (Patient)
> >Value: 0.200195506\0.200195506\0.224999994
> >
> >(0020,0037) Image Orientation (Patient)
> >Value: 1\0\0\0\1\0
> >
> >(0020,4000) Image Comments
> >(0021,0010)
> >Value: Timepoint Information
> >
> >(0021,1010)
> >Value: 20120116 120608.154000
> >(0021,1011)
> >Value: UNKNOWN
> >
> >(0028,0002) Samples per Pixel
> >Value: 1
> >(0028,0004) Photometric Interpretation
> >Value: MONOCHROME2
> >
> >(0028,0008) Number of Frames
> >Value: 1
> >(0028,0010) Rows
> >Value: 512
> >(0028,0011) Columns
> >Value: 512
> >(0028,0030) Pixel Spacing
> >Value: 0.400391012\0.400391012
> >
> >(0028,0100) Bits Allocated
> >Value: 16
> >(0028,0101) Bits Stored
> >Value: 16
> >(0028,0102) High Bit
> >Value: 15
> >(0028,0103) Pixel Representation
> >Value: 1
> >(0028,0106) Smallest Image Pixel Value
> >Value: 0
> >(0028,0107) Largest Image Pixel Value
> >Value: 2610
> >(0028,1050) Window Center
> >Value: 150
> >(0028,1051) Window Width
> >Value: 500
> >(0028,1052) Rescale Intercept
> >Value: -1024
> >(0028,1053) Rescale Slope
> >Value: 1
> >
> >
> >
> >
> >Thanks,
> >Mengda
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
> ________________________________
> Notice: This UI Health Care e-mail (including attachments) is covered by
> the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
> confidential and may be legally privileged. If you are not the intended
> recipient, you are hereby notified that any retention, dissemination,
> distribution, or copying of this communication is strictly prohibited.
> Please reply to the sender that you have received the message in error,
> then delete it. Thank you.
> ________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20131111/6b4f162b/attachment-0001.html>
-------------- next part --------------
_____________________________________
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
More information about the Community
mailing list