[Insight-users] Problem Reading Dicom Files

Samuel Rodriguez Bescosl srodrigu@gbt.tfo.upm.es
Mon, 4 Nov 2002 10:28:52 +0100


Hello Luis,

I'm afraid that I can't continue working for a moment (I hope It was a
little), Because I have a problem with my computer. As soon I continue I
tell If I can read the .dcm file in the examples you have mentioned.

I'm not sure but I think but I'm working in the CVS version in September. I
guess that the examples you said are of another later version. When the
problem is solve I'll download the latest CVS version.


Thanks again,

Sam


----- Original Message -----
From: "Luis Ibanez" <luis.ibanez@kitware.com>
To: "Samuel Rodríguez Bescos" <srodrigu@gbt.tfo.upm.es>
Cc: <insight-users@public.kitware.com>
Sent: Thursday, October 31, 2002 4:56 PM
Subject: Re: [Insight-users] Problem Reading Dicom Files


> Hi Samuel,
>
> What version of ITK are you using ?
>
> The RegisterOneFactory() method is no longer needed.
> Factories for common file formats are now registered
> by default. It should be enough to provide the file
> name (making sure that the ".dcm" extension is used).
>
> The Dicom reader implemented in ITK support a
> certain number of common lables.  You can find
> the details at:
>
>      Insight/Code/IO/itkDicomImageIO.cxx
>
> --
>
> Could you please try to read your dicom file using
> one of the ITK example applications. For example:
>
> 1) GaussianFilter2D
> 2) DicomImageViewer
>
>
> Please let us know if any of these applications can
> read your dicom file.
>
> Thanks
>
>
>     Luis
>
>
>
> ==============================================
> Samuel Rodríguez Bescos wrote:
> > Hello everybody,
> >
> >
> >
> > I'm executing then testing program of itk (itkIOTest.exe) for reading a
> > dicom files. The problem is that It can't read my dicom files. Does
> > anybody know if the Dicom Files must have got any special properties?.
> >
> >
> >
> > I have only change the name of the file I want to read. This is the
code:
> >
> >
> >
> >       typedef unsigned short PixelType;
> >
> >       typedef itk::Image<PixelType, 2> myImage;
> >
> >
> >
> >       itk::ImageFileReader<myImage>::Pointer reader
> >                                   =
itk::ImageFileReader<myImage>::New();
> >
> >
> >
> >
> >       // Register on factory capable of creating DicomImage readers
> >      itk::DicomImageIOFactory::RegisterOneFactory();
> >      reader->DebugOn();
> >      reader->SetFileName"Estudio445.dcm");
> >
> >       try
> >      {
> >         reader->Update();
> >      }
> >       catch (itk::ExceptionObject & e)
> >       {
> >         std::cerr << "exception in file reader " << std::endl;
> >         std::cerr << e.GetDescription() << std::endl;
> >         std::cerr << e.GetLocation() << std::endl;
> >         return EXIT_FAILURE;
> >      }
> >
> >
> >
> >
> >
> > And the error is:
> >
> >     Exception in file reader
> >
> >     Could not create IO object for file Estudio445.dcm
> >
> >     Unknwon.
> >
> >
> >
> > Thnks!!
> >
> >
> >
> > Sam
> >
>
>
>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users