[vtkusers] volume data
Ross Eldridge
ross.eldridge at kitware.com
Wed Aug 15 11:37:39 EDT 2007
Vlad-
At the moment, all you can volume render in VTK are vtkImageData (and
its subclasses) or a vtkUnstructuredGrid. If possible, I would have
tried to have your data as a vtkImageData (of which vtkStructuredPoints
is a subclass), as using a vtkVolumeRayCastMapper (which only takes
ImageData) is one of the faster methods of volume rendering.
If your data is in a structured grid, I would suggest converting it to
an unstructured grid using vtkDataSetTriangleFilter. Once you have a
vtkUnstructuredGrid, you should be able to volume render it using a
vtkProjectedTetrahedraMapper, which volume renders unstructured grids.
As long as your data isn't too large, you should be able to volume
render it easily.
-Ross
Vlad - Andrei Lazar wrote:
> Hey,
>
> Thanks for the very quick reply. Indeed it does not work very well
> with glyphs. Trying now to modify the example in the VolumeRendering
> directory. The problem is that my data is a StructuredGrid and
> vtkVolumeRayCastMapper takes in a StructuredPoints at most. Is there a
> way to convert a structuredGrid to StructuredPoint?
>
> Also tried using the vtkVolumeTextureMapper2D but when I call the
> renderer TCL seg faults.
>
> Any easy ways out?
>
>
> Vlad
>
>
>
>
>
>
> Ross Eldridge wrote:
>> Hey Vlad,
>>
>> Instead of using cuts and isosurfaces, have you tried using a volume
>> renderer on your data?
>>
>> If you really want to use glyphs, you'll want to adjust your
>> vtkPolyDataMapper to do what you want. To do that, set your mapper's
>> lookup table to a new vtkLookupTable you create, and set whatever
>> color ranges and alpha range (opacity) you want (don't forget to set
>> your lookup tables scalar range using SetRange). Of course, this is
>> limited to a linear change in opacities, but hopefully it's what
>> you're looking for.
>>
>> -Ross
>>
>>
>> Vlad - Andrei Lazar wrote:
>>
>>> Hello,
>>>
>>> I am trying to visuzlize 3D volume data. As it is rather hard to see
>>> anything using cuts or isosrufaces, I have to come up with a new way.
>>>
>>> My idea was to place a glyph at each data point and make the opacity
>>> of the glyph proportional to the value in that voxel. So far I did
>>> not manage to do such a thing (the documentation is not all that
>>> great I have to say...).
>>>
>>> Is there an easy way to do such thing?
>>>
>>> Best regards,
>>> Vlad
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> This is the private VTK discussion list. Please keep messages
>>> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>
More information about the vtkusers
mailing list