<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Dear ITK-Users,</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Apologies for revisiting an issue that has been posted multiple times on this forum. I tried reading all previous responses on the subject before writing this.</div><div><br></div><div>1. External GDCM build:<br></div><div>The problem is building ITK using a system/external build of the GDCM library. I am doing this on a Windows (7) 64-bit machine, using the latest versions of CMake (2.8.8), ITK (4.1.0) and GDCM (2.2.0). The error that I obtain is the same LINK error as that has been reported earlier for this configuration: gdcmMSFF.lib not found. Attempts to manually add the location of the library (i.e. adding
 ..\GDCM-2.2BinariesLocation\bin\Release) to the project that fails to build does not solve the problem. I have tried various suggested solutions (one involving building the INSTALL project), another using some tweaks to the GDCM CMake files (http://review.source.kitware.com/#/c/1712/) but none of these have worked. Some respondents have stated that the problem is specific to their Windows builds and that the same code-base builds correctly on Linux.</div><br>2. Reading in DICOM tags:<br><div><br></div><div>I reproduce below the code snippet that I am using. (I am omitting the preceding use of itk::GDCMSeriesFileNames, gdcm::Reader etc (taken from the Software Guide) that is used to read in a DICOM series from a specified folder - all that works correctly for me)<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br></div><div><span class="tab">&nbsp;&nbsp;&nbsp;
 </span><span class="tab">&nbsp;&nbsp;&nbsp; </span>gdcm::Reader greader;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; greader.SetFileName( dicomIO-&gt;GetFileName() );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ( ! greader.Read() ) <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; std::cout &lt;&lt; " GDCM reader read failed \n";<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return false;&nbsp;&nbsp; // handle error<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gdcm::File *f = new gdcm::File();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; f-&gt;SetDataSet ( greader.GetFile().GetDataSet() );<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gdcm::Tag radiopharmInfoSeq(0x0054,0x0016);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const gdcm::DataElement &amp;de = greader.GetFile().GetDataSet().GetDataElement( radiopharmInfoSeq );<br>&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; const gdcm::SequenceOfItems *sqi =de.GetSequenceOfItems();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; std::cout &lt;&lt; sqi &lt;&lt; std::endl;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const gdcm::Item &amp;item = sqi-&gt;GetItem(1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; while (sqi)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //COMMENTED OUT PRSENTLY <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;//std::cout &lt;&lt; sqi-&gt;GetEntryString(0x0018,0x1072) &lt;&lt; std::endl;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //sqi = sqi-&gt;GetNextSQItem();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</div><div><br></div><div>The result of the while loop (when the cvommented lines are uncommented) is that no tags get read, as the SequenceOfItems turns out to be a null sequence / sequence of zero length. I believe this has to
 do with whether Explicit or Implicit VR format is used in the DICOM data ? Is there a way to read this (using the ITK-supplied version of GDCM if necessary) ?</div><div><br></div><div>Any help will be greatly appreciated. Thank you.</div><div><br></div><div>-- Arun</div><div><br></div><br></div></body></html>