<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><br class=""></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class="">Hi Matt,<br class=""><br class="">Yes I do know that. I have tried to put the spacing information from the<br class="">itk::Image using various combinations with the tags 0018|0088 (slice<br class="">thickness) and 0018|0050 (spacing between slices) but to no avail.<br class=""><br class="">Thanks for your help,<br class="">Sarthak<br class=""></blockquote><br class=""></div><div>I was having this same issue until I extended the GDCMImageIO class as it overrides the spacing no matter what you set in the tag. I had to copy the Write() method, and add lines similar to:</div><div><br class=""></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: rgb(120, 73, 42); font-variant-ligatures: no-common-ligatures;" class="">vcl_string</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> tmpStr;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">if</span><span style="font-variant-ligatures: no-common-ligatures" class=""> ( </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">itk</span><span style="font-variant-ligatures: no-common-ligatures" class="">::</span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">ExposeMetaData</span><span style="font-variant-ligatures: no-common-ligatures" class="">< </span><span style="font-variant-ligatures: no-common-ligatures; color: #78492a" class="">vcl_string</span><span style="font-variant-ligatures: no-common-ligatures" class=""> >( dict, </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"0018|0088"</span><span style="font-variant-ligatures: no-common-ligatures" class="">, tmpStr ) )</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>{</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">m_Spacing</span><span style="font-variant-ligatures: no-common-ligatures" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span><span style="font-variant-ligatures: no-common-ligatures" class="">] = </span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">atof</span><span style="font-variant-ligatures: no-common-ligatures" class="">( tmpStr.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">c_str</span><span style="font-variant-ligatures: no-common-ligatures" class="">() );</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="margin: 0px; line-height: normal; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><span style="font-family: Tahoma; font-size: 12px;" class="">before the following code:</span></div><p style="margin: 0px; line-height: normal; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span><br class="webkit-block-placeholder"></p><div style="margin: 0px; line-height: normal; color: rgb(112, 61, 170);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">gdcm</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">::</span><span style="font-variant-ligatures: no-common-ligatures" class="">SmartPointer</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><</span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">gdcm</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">::</span><span style="font-variant-ligatures: no-common-ligatures" class="">Image</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">> simage = </span><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">new</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">gdcm</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">::</span><span style="font-variant-ligatures: no-common-ligatures" class="">Image</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">;</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">gdcm</span><span style="font-variant-ligatures: no-common-ligatures" class="">::</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Image</span><span style="font-variant-ligatures: no-common-ligatures" class=""> &image = *simage;</span></div><div style="margin: 0px; line-height: normal; color: rgb(62, 30, 129);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>image.</span><span style="font-variant-ligatures: no-common-ligatures" class="">SetTransferSyntax</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">( </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">gdcm</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">::</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">TransferSyntax</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">::</span><span style="font-variant-ligatures: no-common-ligatures" class="">ExplicitVRLittleEndian</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> );</span></div><div style="margin: 0px; line-height: normal; color: rgb(62, 30, 129);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>image.</span><span style="font-variant-ligatures: no-common-ligatures" class="">SetNumberOfDimensions</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">( </span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> ); </span><span style="font-variant-ligatures: no-common-ligatures; color: #008400" class="">// good default</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>image.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">SetDimension</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="font-variant-ligatures: no-common-ligatures" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">m_Dimensions</span><span style="font-variant-ligatures: no-common-ligatures" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="font-variant-ligatures: no-common-ligatures" class="">] );</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>image.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">SetDimension</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">m_Dimensions</span><span style="font-variant-ligatures: no-common-ligatures" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">] );</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>image.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">SetSpacing</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="font-variant-ligatures: no-common-ligatures" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">m_Spacing</span><span style="font-variant-ligatures: no-common-ligatures" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span><span style="font-variant-ligatures: no-common-ligatures" class="">] );</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>image.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">SetSpacing</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">m_Spacing</span><span style="font-variant-ligatures: no-common-ligatures" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span><span style="font-variant-ligatures: no-common-ligatures" class="">] );</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>image.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">SetSpacing</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span><span style="font-variant-ligatures: no-common-ligatures" class="">, </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">m_Spacing</span><span style="font-variant-ligatures: no-common-ligatures" class="">[</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span><span style="font-variant-ligatures: no-common-ligatures" class="">] );</span></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: Tahoma; font-size: 12px;" class="">I hope this helps,</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: Tahoma; font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: Tahoma; font-size: 12px;" class="">Todd</span></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><div style="font-family: Tahoma; font-size: 12px;" class=""><b class="">Todd Jensen</b>, PhD</div><div style="font-family: Tahoma; font-size: 12px;" class="">Jensen Informatics LLC</div><div style="font-family: Tahoma; font-size: 12px;" class=""><a href="http://www.linkedin.com/in/toddjensen" class="">https://about.me/todd.jensen</a></div><div style="font-family: Tahoma; font-size: 12px;" class="">+1 (262) 682-0143</div><div style="font-family: Tahoma; font-size: 12px;" class=""><a href="mailto:todd@jenseninformatics.com" class="">todd@jenseninformatics.com</a></div><div style="font-family: Tahoma; font-size: 12px;" class=""><br class=""></div><div style="font-family: Tahoma; font-size: 12px;" class=""><span style="color: rgb(124, 130, 143); font-family: Helvetica, sans-serif; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1; background-color: rgb(255, 255, 255);" class="">Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.</span></div></div></div></div></body></html>