Pb with vtkImageData (still does not work)

Jorrit Schaap jorrit at lkeb.azl.nl
Wed Dec 15 05:58:57 EST 1999


Hi,

We know of this problem in a different context.
We have some 3D voxel data stored in vtkImageData and put it in a
vtkVolumeRaycastMapper. If i render this, everything looks fine. If i ask the
mapper (somewhere else in the program) what its input is, i get
vtkStructuredPoints. If i use the vtkStructuredPoints as an input in a filter
(for example vtkExtractVOI) the whole thing crashes.
We tried to figure out where the error occurs, and it seems that the Extent isn't
set correctly. (UpdateExtent or WholeExtent, or whateverExtent).
Does this sound familiar to anyone?

Why do most VolumeMappers still use vtkStructuredPoints internally? the
vtkStructuredPoints is (almost) obsolete, and if you take a look at the class, it
is almost empty. Is there a prognosis on when vtkStructuredPoints will be removed
completely (and when vtkImageData will take its place succesfully)?

Greetings, Jorrit

Wilfrid Lefer wrote:

> Dear Charles,
> I tried both the SetWholeExtent() method and to copy the ImageData
> information but neither gave a positive result. Here is my code now:
>
> vtkTIFFReader r
>   r SetFileName titi.tif
>   r Update
>   set scals1 [[[r GetOutput] GetPointData] GetScalars]
> vtkScalars scals2
>   scals2 SetDataType [$scals1 GetDataType]
>   scals2 SetNumberOfComponents [$scals1 GetNumberOfComponents]
>   scals2 SetNumberOfScalars [$scals1 GetNumberOfScalars]
>   scals2 SetData [$scals1 GetData]
> vtkImageData i
>   i CopyStructure [r GetOutput]
>   [i GetImageInformation] Copy [[r GetOutput] GetImageInformation]
>   set ext [[r GetOutput] GetWholeExtent]
>   i SetWholeExtent [lindex $ext 0] [lindex $ext 1] [lindex $ext 2]
> [lindex $ext 3] [lindex $ext 4] [lindex $ext 5]
>   [i GetPointData] SetScalars scals2
> vtkTIFFWriter w
>   w SetFileName titi2.tif
>   w SetInput i
>   w Write
> puts "Done"
>
> --
>  ____________________________________________________________________
> |                          |                                         |
> | Wilfrid LEFER            |  phone: (+33) 3.21.97.00.46             |
> | LIL, B.P. 719            |  fax: (+33) 3.21.19.06.61               |
> | 62 228 CALAIS Cedex      |  e-mail: lefer at lil.univ-littoral.fr     |
> | FRANCE                   |  http://www-lil.univ-littoral.fr/~lefer |
> |__________________________|_________________________________________|
>
> -----------------------------------------------------------------------------
> This is the private VTK discussion list.  Please keep messages on-topic.
> Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at gsao.med.ge.com>.  For help, send message body containing
> "info vtkusers" to the same address.     Live long and prosper.
> -----------------------------------------------------------------------------



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list