[vtkusers] "Disabling" a volume rendering pipeline in a controlled way?

Elvis Stansvik elvis.stansvik at orexplore.com
Tue Jun 28 14:54:47 EDT 2016


2016-06-28 20:42 GMT+02:00 Sankhesh Jhaveri <sankhesh.jhaveri at kitware.com>:

> Hi Elvis,
>
> You could do any one of the following if it is an invalid filename:
>
> 1. Set the visibility of the volume to be 0.
> 2. Remove the volume from the renderer.
>
> Sankhesh
>

Thanks Sankhesh, I think I'll remove the volume from the renderer then, but
keep it around (and the rest of the pipeline intact) until next time I need
it.

Elvis


>
>
>
> On Tue, Jun 28, 2016 at 2:04 PM, Elvis Stansvik <
> elvis.stansvik at orexplore.com> wrote:
>
>> Hi,
>>
>> I have a volume rendering pipeline set up. In response to user
>> interactions, I can manipulate certain aspects of the pipeline and
>> re-render. I can even set the filename of the reader that I use as a
>> source, to completely change out the volume being rendered.
>>
>> But what if I want to completely disable the pipeline, in effect
>> unsetting the filename of the reader.
>>
>> My pipeline is basically just HDF5Reader -> vtkGPUVolumeRayCastMapper,
>> where HDF5Reader is a custom reader I wrote to read volumes from a HDF5
>> file.
>>
>> The problem is I can't just setFileName(None) on my reader, because my
>> custom reader has a
>>
>>         if self._fileName is None:
>>             return 0
>>
>> in its RequestData and RequestInformation, and I will thus get errors
>> from VTK saying the pipeline failed if I do this.
>>
>> So my question is: What is the proper way of "unhooking" (or "disabling"
>> if you will) a pipeline? I want the render window to simply show empty
>> space when in this state, but still have the entire pipeline intact and
>> ready for when I next want to set the filename of the reader to a valid
>> volume.
>>
>> Thanks in advance,
>> Elvis
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160628/419b6fbb/attachment-0001.html>


More information about the vtkusers mailing list