[vtkusers] vtkDICOMImageReader and an extrange error,..
Mathieu Malaterre
mathieu.malaterre at gmail.com
Mon Mar 16 08:27:58 EDT 2009
On Fri, Mar 13, 2009 at 5:01 PM, Miguel Angel Rodriguez Florido
<marf at itccanarias.org> wrote:
> Hi all,
>
> Sorry in advance, because perhaps this is an stupid question but
> right now I don't know what is happening.
>
> I have a .dcm file. I would like to read the data using the
> vtkDICOMImageReader that I have done before, but when I execute this simple
> pipeline under Tcl:
>
> vtkDICOMImageReader v16
> puts [v16 GetPatientName]
> v16 SetFileName "./models/RX/ser7008img00001.dcm"
> v16 Update
>
> I got this error (even if I add explicitly the data extent, type of data,
> spacing, etc):
>
> ERROR: In /home/marf/software/Slicer3/vtk5src/IO/vtkDICOMImageReader.cxx,
> line 284
> vtkDICOMImageReader (0x8178870): No memory allocated for image data!
>
> I'm using vtk5.1 and I have used this version of VTK to read another dicom
> files. I can open this file with Slicer or any other application, but I
> don't know what is happening with my simple example.
>
> Does anybody know where I'm wrong?.
Did you read the documentation ?
http://www.vtk.org/doc/nightly/html/classvtkDICOMImageReader.html
If you can read it with Slicer, this means this is a proper DICOM file
but vtkDICOMImageReader only handles:
...
Warning:
This reader might eventually handle ACR-NEMA file (predecessor of
the DICOM format for medical images). This reader does not handle
encapsulated format, only plain raw file are handled. This reader also
does not handle multi-frames DICOM datasets.
...
Have a look at vtkGDCMImageReader which will handle you file (I would
bet this is a compressed data).
http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html
ref:
http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0
If you cannot integrate gdcm into your project you can use gdcmconv
--raw to decompress the image and make it compatible with
vtkDICOMImageReader
http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=Gdcmconv
2cts
--
Mathieu
More information about the vtkusers
mailing list