[Insight-users] cannot open DICOM with ITK 4.3.1

Luca Tersi lucatersi at gmail.com
Wed Apr 17 05:26:22 EDT 2013


Dear all,

I've been using ITK and VTK for a while, but after a recent upgrade to
ITK4.3.1, I cannot open DICOM series or single .dcm files. I obtain the
following exception:


itk::ExceptionObject (0x2a12eb0)

Location: "unknown"

File:
/home/lt/Work/FLUORO/kitware/ITK4.3.1_src/Modules/IO/GDCM/src/itkGDCMImageIO.cxx

Line: 335

Description: itk::ERROR: GDCMImageIO(0x3180830): Cannot read requested file



This is my code:

 QString filename = QFileDialog::getOpenFileName(currentDir, "*", this,
"Open file dialog", "Choose Input DICOM File" );
  if ( filename.length()  == 0 )
    {
      cout<<"aborted"<<endl;
      return;
    }

  typedef itk::Image< IntPixelType, voxelDimension >        IntVolumeType;
  typedef itk::ImageFileReader< IntVolumeType >       IntVolumeReaderType;
  IntVolumeReaderType::Pointer reader=IntVolumeReaderType::New();
  reader->SetFileName ( filename.latin1() );
  ImageIOType::Pointer gdcmImageIO = ImageIOType::New();
  reader->SetImageIO ( gdcmImageIO );

  try
  {
    reader->Update();
  }
  catch ( itk::ExceptionObject & excp )
  {
    std::cerr << "Error reading the images " << std::endl;
    std::cerr << excp << std::endl;
    return;
  }




If I do not specify any IO object (it was working with ITK4.2.1) I get:

itk::ImageFileReaderException (0x13a7510)

Location: "void itk::ImageFileReader<TOutputImage,
ConvertPixelTraits>::GenerateOutputInformation() [with TOutputImage =
itk::Image<short unsigned int, 3u>; ConvertPixelTraits =
itk::DefaultConvertPixelTraits<short unsigned int>]"

File:
/home/lt/Work/FLUORO/kitware/ITK4.3.1_src/Modules/IO/ImageBase/include/itkImageFileReader.hxx

Line: 143

Description: Could not create IO object for file
/run/media/lt/CODONICS/DICOM/ST000000/SE000015/XA000000

Tried to create one of the following:

JPEGImageIO

GDCMImageIO

BMPImageIO

LSMImageIO

PNGImageIO

TIFFImageIO

VTKImageIO

StimulateImageIO

BioRadImageIO

MetaImageIO

NiftiImageIO

NrrdImageIO

GiplImageIO

HDF5ImageIO

You probably failed to set a file suffix, or

set the suffix to an unsupported type.

Is anybody having the same issue? Do you have any hints?

Thanks in advance

Luca
---

*Luca Tersi, Ph.D.*
*Health Sciences and Technologies - Interdepartmental Center for Industrial
Research (HST - ICIR) *
*Alma Mater Studiorum - University of Bologna; *Via Cavalcavia 797, I-47521
Cesena (FC) - Italy
----------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130417/1cf27523/attachment.htm>


More information about the Insight-users mailing list