<div dir="ltr"><div>BTW, here is what I got by running gdcminfo (gdcm version 2.4.0) on one of the dicoms:<br>======================================================================<br>MediaStorage is 1.2.840.10008.5.1.4.1.1.7 [Secondary Capture Image 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></div>Clearly, from <table border="0" cellpadding="0" cellspacing="0" width="78">
<colgroup><col width="78"></colgroup><tbody><tr height="19">
  <td class="" style="height:14.4pt;width:58pt" height="19" width="78">(0018,0088)=0.449999988 <br><table border="0" cellpadding="0" cellspacing="0" width="78"><colgroup><col width="78"></colgroup><tbody><tr height="19">

  <td class="" style="height:14.4pt;width:58pt" height="19" width="78">(0028,0030)=0.400391012\0.400391012<br><br>The spacing should not be (1,1,1).<br><br></td>
</tr></tbody></table>Thanks,<br>Mengda<br></td>
</tr></tbody></table><div> <br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 10:14 AM, Mengda Wu <span dir="ltr">&lt;<a href="mailto:wumengda@gmail.com" target="_blank">wumengda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div dir="ltr">Hi all,<br><div class="gmail_quote"><div dir="ltr"><br>  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 
<table style="padding:8px 4px;border-spacing:0px;font-family:monospace;font-size:small"><tbody><tr style="background-color:rgb(246,246,240)"><td style="padding:2px 5px;vertical-align:top">
<a title="Examples/IO/DicomSeriesReadImageWrite2.cxx" href="http://itk.org/gitweb?p=ITK.git;a=blob_plain;f=Examples/IO/DicomSeriesReadImageWrite2.cxx;hb=HEAD" style="font-weight:bold;background-color:rgba(255,255,255,0)" target="_blank"><font color="#000000" face="Helvetica Neue, Helvetica, Arial, sans-serif" size="3">DicomSeriesReadImageWrite2.cxx</font></a><br>



</td><td style="padding:2px 5px;vertical-align:top;text-align:right"><br></td><td style="padding:2px 5px;vertical-align:top"><br></td><td style="padding:2px 5px;vertical-align:top"><br>
</td></tr></tbody></table><div>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. </div><div>
<br></div><div>Can you help? I am attaching the fields from one dicom as follows:<br><br>(0002,0000)    Group Length                                         Value: 206 <br>(0002,0001)    File Meta Information Version                        Value: 0<br>


(0002,0002)    Media Storage SOP Class UID                          Value: 1.2.840.10008.5.1.4.1.1.7<br>(0002,0003)    Media Storage SOP Instance UID                       Value: 1.2.276.0.28.3.2418833.1095761920.42.5040.2012041216272628700<br>


(0002,0010)    Transfer Syntax UID                                  Value: 1.2.840.10008.1.2.1<br>(0002,0012)    Implementation Class UID                             Value: 1.2.276.0.7230010.3.0.3.6.0<br>(0002,0013)    Implementation Version Name                          Value: OFFIS_DCMTK_360 <br>


(0008,0008)    Image Type                                           Value: DERIVED\SECONDARY\REFORMATTED <br>(0008,0016)    SOP Class UID                                        Value: 1.2.840.10008.5.1.4.1.1.7<br>(0008,0018)    SOP Instance UID                                     Value: 1.2.276.0.28.3.2418833.1095761920.42.5040.2012041216272628700<br>


(0008,0020)    Study Date                                           <br>(0008,0022)    Acquisition Date                                     Value: 20120116<br>(0008,0023)    Image Date                                           Value: 20120116<br>


(0008,0030)    Study Time                                           <br>(0008,0033)    Image Time                                           Value: 120859.658000 <br>(0008,0050)    Accession Number                                     <br>


(0008,0060)    Modality                                             Value: CT<br>(0008,0070)    Manufacturer                                         Value: Philips <br>(0008,0080)    Institution Name                                     Value: Hide <br>


(0008,0090)    Referring Physician&#39;s Name                           <br>(0008,103E)    Series Description                                   Value: Hide <br>(0008,1090)    Manufacturer&#39;s Model Name                            Value: Brillance 64<br>


(0010,0010)    Patient&#39;s Name                                       Value: Patient00<br>(0010,0020)    Patient ID                                           <br>(0010,0030)    Patient&#39;s Birth Date                                 Value: NewDOB16<br>


(0010,0040)    Patient&#39;s Sex                                        Value: F <br>(0010,1010)    Patient&#39;s Age                                        Value: 054Y<br>(0018,0088)    Spacing Between Slices                               Value: 0.449999988 <br>


(0018,1151)    X-ray Tube Current                                   Value: 429 <br>(0020,000D)    Study Instance UID                                   Value: 1.2.276.0.28.3.2418833.1095761920.42.3628.2012011611085965900<br>


(0020,000E)    Series Instance UID                                  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                                         Value: 1 <br>(0020,0020)    Patient Orientation                                  <br>(0020,0032)    Image Position (Patient)                             Value: 0.200195506\0.200195506\0.224999994 <br>


(0020,0037)    Image Orientation (Patient)                          Value: 1\0\0\0\1\0 <br>(0020,4000)    Image Comments                                       <br>(0021,0010)                                                         Value: Timepoint Information <br>


(0021,1010)                                                         Value: 20120116 120608.154000<br>(0021,1011)                                                         Value: UNKNOWN <br>(0028,0002)    Samples per Pixel                                    Value: 1 <br>


(0028,0004)    Photometric Interpretation                           Value: MONOCHROME2 <br>(0028,0008)    Number of Frames                                     Value: 1 <br>(0028,0010)    Rows                                                 Value: 512 <br>


(0028,0011)    Columns                                              Value: 512 <br>(0028,0030)    Pixel Spacing                                        Value: 0.400391012\0.400391012 <br>(0028,0100)    Bits Allocated                                       Value: 16 <br>


(0028,0101)    Bits Stored                                          Value: 16 <br>(0028,0102)    High Bit                                             Value: 15 <br>(0028,0103)    Pixel Representation                                 Value: 1 <br>


(0028,0106)    Smallest Image Pixel Value                           Value: 0 <br>(0028,0107)    Largest Image Pixel Value                            Value: 2610 <br>(0028,1050)    Window Center                                        Value: 150 <br>


(0028,1051)    Window Width                                         Value: 500 <br>(0028,1052)    Rescale Intercept                                    Value: -1024 <br>(0028,1053)    Rescale Slope                                        Value: 1 <br>


<br></div><div><br></div><div>Thanks,</div><div>Mengda</div><br></div>
</div><br></div>
</div></div></blockquote></div><br></div>