[Insight-users] GDCMSeriesFileNames.cxx "No Series were found" error help?

John Drozd john.drozd at gmail.com
Sat Oct 9 02:48:20 EDT 2010


Hi,

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).

John

On Fri, Oct 8, 2010 at 10:26 PM, C G <luckylakeway at gmail.com> wrote:

> 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.
>
> 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:
>
> -------------------------------------------------------------------------------------
>     typedef  itk::ImageSeriesReader< IImageType3d > ReaderType;
>     typedef itk::GDCMImageIO  ImageIOType;
>     typedef itk::GDCMSeriesFileNames NamesGeneratorType;
>
>     ReaderType::Pointer myreader = ReaderType::New();
>     ImageIOType::Pointer mydicomIO = ImageIOType::New();
>     myreader-> SetImageIO(mydicomIO);
>     NamesGeneratorType::Pointer mynameGenerator =
> NamesGeneratorType::New();
>     //mynameGenerator->SetUseSeriesDetails(true); //using vs not using this
> does not make a difference it seems
>     mynameGenerator->SetInputDirectory(directory);
>
>     typedef std::vector<std::string> SeriesIdContainer;
>     const SeriesIdContainer & seriesUID = mynameGenerator->GetSeriesUIDs();
> //THIS LINE GENERATES THE WARNING
>     std::string seriesIdentifier;
>     seriesIdentifier = seriesUID.begin()->c_str(); //since i have no series
> UID this line kills the program
>
> -------------------------------------------------------------------------------------
>
> the GetSeriesUIDs function (where I'm failing to get info from my dicom) in
> the GDCMSeriesFileNames.cxx file contains:
>     gdcm::FileList *flist = m_SerieHelper->GetFirstSingleSerieUIDFileSet();
> which is returning a null pointer.
>
> this function is, in turn, from the gdcmSerieHelper class:
>     FileList *SerieHelper::GetFirstSingleSerieUIDFileSet()
>     {
>        ItFileSetHt = SingleSerieUIDFileSetHT.begin();
>        ........
>
> SingleSerieUIDFileSetHT is defined as
>    typedef std::map<std::string, FileList *> SingleSerieUIDFileSetmap;
>    SingleSerieUIDFileSetmap SingleSerieUIDFileSetHT;
>
>
> *****
> 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.
>
> 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...).
>
> 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.
>
> Any help or ideas would be greatly appreciated!
> -courtenay
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101009/05a9a346/attachment.htm>
-------------- next part --------------
PROJECT(ReadAtlasDicomSeriesAndReadSubjectDicomSeries)
INCLUDE_REGULAR_EXPRESSION("^.*$")

# Find ITK.
FIND_PACKAGE(ITK REQUIRED)
#IF(ITK_FOUND)
#  INCLUDE(${ITK_USE_FILE})
#ENDIF(ITK_FOUND)

SET(BASELINE ${ITK_DATA_ROOT}/Baseline/Registration)
SET(TEMP ${ITK_BINARY_DIR}/Testing/Temporary)

include_directories (/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Code/IO
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Code/Common 
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight-build
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Utilities/vxl/vcl
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight-build/Utilities/vxl/vcl
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Utilities/vxl/core
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight-build/Utilities/vxl/core
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight-build/Utilities
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Code/BasicFilters
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Code/Review
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Code/Algorithms
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Code/Numerics/Statistics
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Code/Numerics/FEM
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Code/Numerics
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Code/SpatialObject
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Utilities/MetaIO
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Utilities
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight/Utilities/gdcm/src
/trumpet/downloads/3DSlicer/Slicer3-lib/Insight-build/Utilities/gdcm)

link_directories (/trumpet/downloads/3DSlicer/Slicer3-lib/Insight-build/bin)

ADD_EXECUTABLE(ReadAtlasDicomSeriesAndReadSubjectDicomSeries ReadAtlasDicomSeriesAndReadSubjectDicomSeries.cxx )
TARGET_LINK_LIBRARIES(ReadAtlasDicomSeriesAndReadSubjectDicomSeries ITKFEM ITKIO
                                              ITKStatistics ITKNumerics ITKCommon)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReadAtlasDicomSeriesAndReadSubjectDicomSeries.cxx
Type: application/octet-stream
Size: 7224 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101009/05a9a346/attachment.obj>


More information about the Insight-users mailing list