[vtkusers] vtlVolumeReader

William Oliver oliver at afip.org
Wed Apr 10 13:19:49 EDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I missed the first part of this discussion, so if someone has
already said this, I apologize.

There is a routine for reading 3D data in one file: vtkImageReader.

I had this question some months ago for reading raw 3D MRI data, and
someone was nice enough to answer it.  For me to read a 256x256x256 dataset
without a header, the code is (for Tcl):

vtkImageReader reader
     reader SetFileName "/home/oliver/data/tst.dat"
     reader DebugOn
     reader SetFileDimensionality 3
     reader SetDataExtent 0 255 0 255 0 255
     reader SetDataOrigin 0 0 0
     reader SetDataScalarTypeToUnsignedShort
     reader SetDataMask 0x7fff
     reader SetDataSpacing 1 1 1
     reader SetDataByteOrderToBigEndian
     reader SeadHeaderSize 0



then, when you get ready to render:


vtkVolumeRayCastMapper volumeMapper
     ...[stuff]
     volumeMapper SetInput [reader GetOutput]
     ...[stuff]




It works great for me.



William R Oliver, MD

For PGP public key, send email to oliver at afip.org


On Wed, 10 Apr 2002, Thomas Deschamps wrote:

> Hi,
>
> I still do not understand why there is no routine to read volumetric
> images contained in a single file?
> 3D datasets in slices in not so common. Ok, DICOM is often sliced, but
> there are frequently datasets contained in an unique file. It is often
> more convenient, especially for practical reasons (copying and
> transmission for example, compactness also).
> Does anyone try to incorporate it into vtk?
> Is it not more interesting to have a vtkVolumeReader class which is more
> general, thus allowing sliced and self-contained datasets?
> Maybe I did not notice that it exists somewhere. But I always use
> vtkImageReader + vtkImageToStructuredPoints.
>
> Thomas Deschamps
> TDeschamps at lbl.gov
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (IRIX64)
Comment: Made with pgp4pine 1.76

iD8DBQE8tHQ7GyPMvQL2C60RAhTRAJ9nNoeI5s+vYBVawPu9WyISbAaTJQCeMnyM
bdnVUVs/1N94IjnjtLKOuTw=
=Yofn
-----END PGP SIGNATURE-----





More information about the vtkusers mailing list