<div dir="ltr"><div><div><div>Hi Norman,<br><br></div> 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.<br>
<br></div> 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.<br><br>Thanks,<br>
</div>Mengda<br><div><div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 10:40 AM, Williams, Norman K <span dir="ltr"><<a href="mailto:norman-k-williams@uiowa.edu" target="_blank">norman-k-williams@uiowa.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Try using DCMTKImageIO instead. This needs to be turned on when you<br>
configure and build ITK.<br>
<br>
Module_ITKDCMTK:BOOL=ON<br>
Module_ITKIODCMTK:BOOL=ON<br>
GDCM has some issues with reading DICOM files. These may or may not be<br>
addressed with a more recent version of GDCM; the last time I tried using<br>
a current version of GDCM I couldn't get ITK to build with it.<br>
<br>
--<br>
Kent Williams <a href="mailto:norman-k-williams@uiowa.edu" target="_blank">norman-k-williams@uiowa.edu</a><br>
<div><div><br>
<br>
<br>
<br>
<br>
<br>
On 11/11/13 9:22 AM, "Mengda Wu" <<a href="mailto:wumengda@gmail.com" target="_blank">wumengda@gmail.com</a>> wrote:<br>
<br>
>BTW, here is what I got by running gdcminfo (gdcm version 2.4.0) on one<br>
>of the dicoms:<br>
>======================================================================<br>
>MediaStorage is 1.2.840.10008.5.1.4.1.1.7 [Secondary Capture Image<br>
>Storage]<br>
>TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]<br>
>NumberOfDimensions: 2<br>
>Dimensions: (512,512,1)<br>
>SamplesPerPixel :1<br>
>BitsAllocated :16<br>
>BitsStored :16<br>
>HighBit :15<br>
>PixelRepresentation:1<br>
>ScalarType found :INT16<br>
>PhotometricInterpretation: MONOCHROME2<br>
>PlanarConfiguration: 0<br>
>TransferSyntax: 1.2.840.10008.1.2.1<br>
>Origin: (0,0,0)<br>
>Spacing: (1,1,1)<br>
>DirectionCosines: (1,0,0,0,1,0)<br>
>Rescale Intercept/Slope: (-1024,1)<br>
>Orientation Label: AXIAL<br>
>=======================================================================<br>
><br>
><br>
>Clearly, from<br>
>(0018,0088)=0.449999988<br>
><br>
>(0028,0030)=0.400391012\0.400391012<br>
><br>
>The spacing should not be (1,1,1).<br>
><br>
>Thanks,<br>
>Mengda<br>
><br>
><br>
><br>
><br>
><br>
>On Mon, Nov 11, 2013 at 10:14 AM, Mengda Wu<br>
><<a href="mailto:wumengda@gmail.com" target="_blank">wumengda@gmail.com</a>> wrote:<br>
><br>
>Hi all,<br>
><br>
> I have some dicom images in my new project. But when I tried to convert<br>
>them to the ITK metaimages, the origin and spacing are incorrect even<br>
>though the intensities are right. The origin becomes (0,0,0) and spacing<br>
>is (1,1,1). I am the example<br>
>DicomSeriesReadImageWrite2.cxx<br>
</div></div>><<a href="http://itk.org/gitweb?p=ITK.git;a=blob_plain;f=Examples/IO/DicomSeriesRea" target="_blank">http://itk.org/gitweb?p=ITK.git;a=blob_plain;f=Examples/IO/DicomSeriesRea</a><br>
>dImageWrite2.cxx;hb=HEAD><br>
<div><div>><br>
><br>
><br>
>from ITK 4.4.2. The code does not have any issue with other Dicoms for my<br>
>previous projects. so my guess is the current dicoms miss some fields in<br>
>the header that ITK needs.<br>
><br>
><br>
>Can you help? I am attaching the fields from one dicom as follows:<br>
><br>
>(0002,0000) Group Length<br>
>Value: 206<br>
>(0002,0001) File Meta Information Version<br>
>Value: 0<br>
>(0002,0002) Media Storage SOP Class UID<br>
>Value: 1.2.840.10008.5.1.4.1.1.7<br>
>(0002,0003) Media Storage SOP Instance UID<br>
>Value: 1.2.276.0.28.3.2418833.1095761920.42.5040.2012041216272628700<br>
>(0002,0010) Transfer Syntax UID<br>
>Value: 1.2.840.10008.1.2.1<br>
>(0002,0012) Implementation Class UID<br>
>Value: 1.2.276.0.7230010.3.0.3.6.0<br>
>(0002,0013) Implementation Version Name<br>
>Value: OFFIS_DCMTK_360<br>
><br>
>(0008,0008) Image Type<br>
>Value: DERIVED\SECONDARY\REFORMATTED<br>
><br>
>(0008,0016) SOP Class UID<br>
>Value: 1.2.840.10008.5.1.4.1.1.7<br>
>(0008,0018) SOP Instance UID<br>
>Value: 1.2.276.0.28.3.2418833.1095761920.42.5040.2012041216272628700<br>
>(0008,0020) Study Date<br>
>(0008,0022) Acquisition Date<br>
>Value: 20120116<br>
>(0008,0023) Image Date<br>
>Value: 20120116<br>
>(0008,0030) Study Time<br>
>(0008,0033) Image Time<br>
>Value: 120859.658000<br>
><br>
>(0008,0050) Accession Number<br>
>(0008,0060) Modality<br>
>Value: CT<br>
>(0008,0070) Manufacturer<br>
>Value: Philips<br>
><br>
>(0008,0080) Institution Name<br>
>Value: Hide<br>
>(0008,0090) Referring Physician's Name<br>
>(0008,103E) Series Description<br>
>Value: Hide<br>
>(0008,1090) Manufacturer's Model Name<br>
>Value: Brillance 64<br>
>(0010,0010) Patient's Name<br>
>Value: Patient00<br>
>(0010,0020) Patient ID<br>
>(0010,0030) Patient's Birth Date<br>
>Value: NewDOB16<br>
>(0010,0040) Patient's Sex<br>
>Value: F<br>
>(0010,1010) Patient's Age<br>
>Value: 054Y<br>
>(0018,0088) Spacing Between Slices<br>
>Value: 0.449999988<br>
><br>
>(0018,1151) X-ray Tube Current<br>
>Value: 429<br>
>(0020,000D) Study Instance UID<br>
>Value: 1.2.276.0.28.3.2418833.1095761920.42.3628.2012011611085965900<br>
>(0020,000E) Series Instance UID<br>
>Value: 1.2.276.0.28.3.2418833.1095761920.42.3628.2012011611085965901<br>
>(0020,0010) Study ID<br>
>(0020,0011) Series Number<br>
>(0020,0013) Image Number<br>
>Value: 1<br>
>(0020,0020) Patient Orientation<br>
>(0020,0032) Image Position (Patient)<br>
>Value: 0.200195506\0.200195506\0.224999994<br>
><br>
>(0020,0037) Image Orientation (Patient)<br>
>Value: 1\0\0\0\1\0<br>
><br>
>(0020,4000) Image Comments<br>
>(0021,0010)<br>
>Value: Timepoint Information<br>
><br>
>(0021,1010)<br>
>Value: 20120116 120608.154000<br>
>(0021,1011)<br>
>Value: UNKNOWN<br>
><br>
>(0028,0002) Samples per Pixel<br>
>Value: 1<br>
>(0028,0004) Photometric Interpretation<br>
>Value: MONOCHROME2<br>
><br>
>(0028,0008) Number of Frames<br>
>Value: 1<br>
>(0028,0010) Rows<br>
>Value: 512<br>
>(0028,0011) Columns<br>
>Value: 512<br>
>(0028,0030) Pixel Spacing<br>
>Value: 0.400391012\0.400391012<br>
><br>
>(0028,0100) Bits Allocated<br>
>Value: 16<br>
>(0028,0101) Bits Stored<br>
>Value: 16<br>
>(0028,0102) High Bit<br>
>Value: 15<br>
>(0028,0103) Pixel Representation<br>
>Value: 1<br>
>(0028,0106) Smallest Image Pixel Value<br>
>Value: 0<br>
>(0028,0107) Largest Image Pixel Value<br>
>Value: 2610<br>
>(0028,1050) Window Center<br>
>Value: 150<br>
>(0028,1051) Window Width<br>
>Value: 500<br>
>(0028,1052) Rescale Intercept<br>
>Value: -1024<br>
>(0028,1053) Rescale Slope<br>
>Value: 1<br>
><br>
><br>
><br>
><br>
>Thanks,<br>
>Mengda<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
<br>
<br>
<br>
</div></div>________________________________<br>
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.<br>
________________________________<br>
</blockquote></div><br></div></div></div></div></div></div>