[Insight-users] cannot open DICOM with ITK 4.3.1

Bill Lorensen bill.lorensen at gmail.com
Tue May 21 11:22:17 EDT 2013


The compiler should not matter.

Can you share a dicom file that you cannot open?


On Tue, May 21, 2013 at 11:14 AM, Luca Tersi <lucatersi at gmail.com> wrote:

> Dear Bill,
>
> I finally managed to test my code on a Windows platform (MinGW) using ITK
> 4.3.2 and everything seems to work properly.
> I tried again on linux and both 4.3.1 and 4.3.2 do not work.
>
> Might it be a compiler related issue? (gcc 4.8 on linux and 4.7 on windows)
>
> Thanks a lot
>
> Luca
>
>
>
> ---
>
> ----------------------------------------------------------------------------------------------------------
>
>
> On 21 April 2013 00:50, Luca Tersi <lucatersi at gmail.com> wrote:
>
>> Yes, it could be read. I can switch between 4.3.1 and 4.2.1 (same cmake
>> settings): I can open any DICOM file with 4.2.1 but not with 4.3.1. Maybe
>> I'm missing something..
>> Thanks a lot
>> Luca
>>
>> PS. I'm working on Linux Manjaro 64-bit, next week I will try to run it
>> on Windows
>>
>>
>> ---
>>
>> ----------------------------------------------------------------------------------------------------------
>>
>>
>> On 19 April 2013 21:09, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>
>>> Are you saying the same file could be read prior to the upgrade?
>>>
>>>
>>>
>>> On Wed, Apr 17, 2013 at 5:26 AM, Luca Tersi <lucatersi at gmail.com> wrote:
>>>
>>>> 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
>>>>
>>>> ----------------------------------------------------------------------------------------------------------
>>>>
>>>>
>>>> _____________________________________
>>>> 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.php
>>>>
>>>> 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
>>>>
>>>>
>>>
>>>
>>> --
>>> Unpaid intern in BillsBasement at noware dot com
>>>
>>
>>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130521/6595fd29/attachment.htm>


More information about the Insight-users mailing list