<div>Hi,</div>
<div> </div>
<div>I don't know if this will help but attached is my code that reads two Dicom series and converts them to two DICOM volumes (a single DICOM file).</div>
<div> </div>
<div>John<br><br></div>
<div class="gmail_quote">On Fri, Oct 8, 2010 at 10:26 PM, C G <span dir="ltr"><<a href="mailto:luckylakeway@gmail.com">luckylakeway@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi anyone, I am attempting to read in DICOMs and I am getting the warning from itkGDCMSeriesFileNames.cxx "No Series were found," which of course creates an error shortly thereafter. I have ITK and InsightApplications 3.10.0.<br>
<br>my function code up to the problem point is below. this code works for one dicom series I have, but not for another, and I cannot figure out why:<br>-------------------------------------------------------------------------------------<br>
typedef itk::ImageSeriesReader< IImageType3d > ReaderType;<br> typedef itk::GDCMImageIO ImageIOType;<br> typedef itk::GDCMSeriesFileNames NamesGeneratorType;<br><br> ReaderType::Pointer myreader = ReaderType::New();<br>
ImageIOType::Pointer mydicomIO = ImageIOType::New();<br> myreader-> SetImageIO(mydicomIO);<br> NamesGeneratorType::Pointer mynameGenerator = NamesGeneratorType::New();<br> //mynameGenerator->SetUseSeriesDetails(true); //using vs not using this does not make a difference it seems<br>
mynameGenerator->SetInputDirectory(directory);<br><br> typedef std::vector<std::string> SeriesIdContainer;<br> const SeriesIdContainer & seriesUID = mynameGenerator->GetSeriesUIDs(); //THIS LINE GENERATES THE WARNING<br>
std::string seriesIdentifier;<br> seriesIdentifier = seriesUID.begin()->c_str(); //since i have no series UID this line kills the program<br>-------------------------------------------------------------------------------------<br>
<br>the GetSeriesUIDs function (where I'm failing to get info from my dicom) in the GDCMSeriesFileNames.cxx file contains:<br> gdcm::FileList *flist = m_SerieHelper->GetFirstSingleSerieUIDFileSet();<br>which is returning a null pointer.<br>
<br>this function is, in turn, from the gdcmSerieHelper class:<br> FileList *SerieHelper::GetFirstSingleSerieUIDFileSet()<br> {<br> ItFileSetHt = SingleSerieUIDFileSetHT.begin();<br> ........<br><br>SingleSerieUIDFileSetHT is defined as<br>
typedef std::map<std::string, FileList *> SingleSerieUIDFileSetmap;<br> SingleSerieUIDFileSetmap SingleSerieUIDFileSetHT;<br><br><br>*****<br>I can't seem to go any deeper into the code than that without having no idea what I'm looking at anymore. The weird issue is that this code WORKS in one case, fails in another.<br>
<br>Both folders contain 1 series each, with many individual slice files. Both do have a value for the key pair 0020,000E (Series Instance UID), which is the one that the GetSeriesUIDs function actually grabs (I viewed both image sets in DicomWorks - also that key value does appear to be the same for all slices so that shouldn't be the problem). Both series are numerically ordered, with no DIRFILE or DICOMDIR files anywhere (if that makes a difference...).<br>
<br>My code is based on the example code in the ITK guide and I don't see any big discrepancies with it. It works fine for the one dicom series and I can't see what the big difference is between these two image sets, particularly since the key I think it wants appears to be present and valid for both image sets.<br>
<br>Any help or ideas would be greatly appreciated!<br>-courtenay<br><br>_____________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>Please keep messages on-topic and check the ITK FAQ at:<br><a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>