[Insight-users] Convert NRRD into DICOM

Luis Ibanez luis.ibanez at kitware.com
Thu Jul 2 12:50:34 EDT 2009


Hi Ezequiel,

Thanks for the update.

I haven't seen this problem before.

I would be very surprised if the reader relies on absolute
paths, because that will mean that it is impossible to
move NRRD files from one computer to another,... and even
from one directory to another in the same machine.



Did you got an error message ?

If so,
Could you please post it to the mailing list ?

Are you placing the Update() call of the reader
inside a try/catch block ?



   Please let us konw


      Thanks


        Luis


------------------------
Ezequiel Geremia wrote:
> Hi Luis,
> 
> Thank you for answering my mail,
> 
> I managed to read NRRD format by passing the header .nhdr or .mhd files and to convert them into DICOM series.
> 
> The NRRD format I got form the MS Segmentation Challenge 2008 & Liver Tumor Segmentation Challenge 2008 websites seem to be specified as the union of a header and a RAW data file.
> 
> However I experienced another issue concerning the reader. When I pass the header, which contains the relative filename of the .raw file to be converted, as an input, the reader is not able to find it (maybe because the reader relies on absolute filenames).
> 
> Do you know a way out of this ?
> 
> Regards,
> 
> Ezequiel
> 
> 
> 
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
> Sent: 30 June 2009 22:27
> To: Ezequiel Geremia
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] Convert NRRD into DICOM
> 
> 
> 
> Hi Ezequiel,
> 
> 
>      If your input file is in NRRD format,
>      why are you passing a RAW format as input ?
> 
> 
> ITK is expecting that a NRRD file will be called
> 
>                LTS_IMG05.nrrd
> 
> not to be called:
> 
>                LTS_IMG05.raw
> 
> 
> 
> Also, is this image 2D or 3D ?
> 
> 
> You may have to retouch the example code in order
> to manage 3D images.
> 
> 
>     Regards,
> 
> 
>         Luis
> 
> 
> --------------------------
> Ezequiel Geremia wrote:
> 
>>Hi,
>>
>> 
>>
>>I tried to convert NRRD, which is ITK supported format, data volumes 
>>into DICOM volumes using the generic converter given in 
>>/ImageReadWrite.exe/ with the following arguments
>>
>>-          Input file: LTS_IMG05.raw
>>
>>-          Output file: LTS_IM05.dcm (also tried .dic and .dicom file 
>>extensions)
>>
>>-          Exception:
>>
>>itk::ImageFileReaderException (0146EEC0)
>>
>>Location: "void __thiscall itk::ImageFileReader<class 
>>itk::Image<short,3>,class itk::DefaultConvertPixelTraits<short> 
>> >::GenerateOutputInformation(void)"
>>
>>File: 
>>c:\users\t-egerem\software\insighttoolkit-3.14.0\src\code\io\itkImageFileReader.txx
>>
>>Line: 144
>>
>>Description:  Could not create IO object for file 
>>C:\Users\t-egerem\Downloads\3D-Liver-Tumor-Segmentation-Challenge-2008\Extracted-Files\Testing-Data\LTS_IMG05.raw
>>
>>  Tried to create one of the following:
>>
>>    GDCMImageIO
>>
>>    MetaImageIO
>>
>>    PNGImageIO
>>
>>    VTKImageIO
>>
>>    GiplImageIO
>>
>>    BioRadImageIO
>>
>>    LSMImageIO
>>
>>    AnalyzeImageIO
>>
>>    NiftiImageIO
>>
>>    StimulateImageIO
>>
>>    JPEGImageIO
>>
>>    TIFFImageIO
>>
>>    NrrdImageIO
>>
>>    BMPImageIO
>>
>>    DICOMImageIO2
>>
>>  You probably failed to set a file suffix or set the suffix to an 
>>unsupported type.
>>
>> 
>>
>>Then I tried to shortcut the pluggable factory mechanism and it does not 
>>as well with the same data it throws the following error message
>>
>>                itk::ExceptionObject (0122F614)
>>
>>Location: "void __thiscall itk::ImageFileReader<class 
>>itk::Image<short,3>,class itk::DefaultConvertPixelTraits<short> 
>> >::EnlargeOutputRequestedRegion(class itk::DataObject *)"File: 
>>c:\users\t-egerem\software\insighttoolkit-3.14.0\src\code\io\itkImageFileReader.txx
>>
>>Line: 342
>>
>>Description: itk::ERROR: ImageFileReader(0172F7C0): ImageIO returns IO 
>>region that does not fully contain the requested regionRequested region: 
>>ImageRegion (0122F8D8)
>>
>>  Dimension: 3
>>
>>  Index: [0, 0, 0]
>>
>>  Size: [0, 0, 0]
>>
>>StreamableRegion region: ImageRegion (0172F8A4)
>>
>>  Dimension: 3
>>
>>  Index: [0, 0, 0]
>>
>>  Size: [0, 0, 0]
>>
>> 
>>
>>If you can think of a solution can you please point it out to me ?
>>
>> 
>>
>>Regards,
>>
>> 
>>
>>Ezequiel Geremia
>>
>> 
>>
>>
>>------------------------------------------------------------------------
>>
>>_____________________________________
>>Powered by www.kitware.com
>>
>>Visit other Kitware open-source projects at
>>http://www.kitware.com/opensource/opensource.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
> 
> 
> 


More information about the Insight-users mailing list