<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> 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> <br></div><div><span class="tab">
</span><span class="tab"> </span>gdcm::Reader greader;<br> greader.SetFileName( dicomIO->GetFileName() );<br> if ( ! greader.Read() ) <br> {<br> std::cout << " GDCM reader read failed \n";<br> return false; // handle error<br> }<br><br> gdcm::File *f = new gdcm::File();<br> f->SetDataSet ( greader.GetFile().GetDataSet() );<br><br> gdcm::Tag radiopharmInfoSeq(0x0054,0x0016);<br> const gdcm::DataElement &de = greader.GetFile().GetDataSet().GetDataElement( radiopharmInfoSeq );<br>
const gdcm::SequenceOfItems *sqi =de.GetSequenceOfItems();<br> std::cout << sqi << std::endl;<br> const gdcm::Item &item = sqi->GetItem(1);<br> while (sqi)<br> {</div><div> //COMMENTED OUT PRSENTLY <br> ;//std::cout << sqi->GetEntryString(0x0018,0x1072) << std::endl;<br> //sqi = sqi->GetNextSQItem();<br> }</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>