[Paraview-developers] Color Scale Editor Design

Biddiscombe, John A. biddisco at cscs.ch
Thu Jul 11 10:01:32 EDT 2013


Previously, I had a custom volume renderer using a new mapper + painters + delivery mechanism (because the image volume rendering in paraview has always been dreadful ...). I had a plugin with a custom mapper and all the colour editor transfer function code was in my own dialog which popped up when you clicked stuff (like the point sprite representation before it got broken and stopped working).

Now I see that the rendering has been improved and there's a vtkSmartVolumeMapper, which appears to do most of the work that my plugin did (creating camera aligned slices and using a fragment shader to texture them) - but the new mapper can also use the raycast mappers as well - which is great, because if I got it working with those too, things'd be wonderful.

I suspect that all I need to do is expose the gradient opacity features in the mapper(s), add some xml and then as you say - add a custom property editor and let the gui do the rest.

The trouble is that I've not got the time to do this and so a student is doing the work instead and the learning curve is quite steep for some of these intricate gui/server manager operations. 

I had a lot of trouble getting the histograms of scalar values out of the servermanager and displaying them in the gui and then sending RGB values back from the gui to the mapper to use for the opacity texture info - I forget the details, but it was awful (I had 65536 values to send and it was very slow).

Also : One really big improvement (in the properties panel) would be to not show the representation controls for the ones that are not visible. It's very distracting having dozens of controls you are not using for representations you can't see.

If you have tips for my student to get the opacity stuff running, then please feel free to chip in with them. I've forgotten most of this stuff, so any pointers to get me started so that he can take over would be great. Thanks

JB


> -----Original Message-----
> From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
> Sent: 11 July 2013 14:51
> To: Biddiscombe, John A.
> Cc: burlen; ParaView Developers
> Subject: Re: [Paraview-developers] Color Scale Editor Design
> 
> What are you doing to add support for Gradient Opacity Transfer function?
> It's just a new LookupTable and/or PiecewiseFunction proxy?
> The new color editor is not going to be a special panel but simply a generic
> "pqProxyWidget" that autogenerates widgets for all properties on the proxy
> (with custom widgets for properties as needed). It should be able to show a
> different proxy (with more/custom widgets) without much of an issue.
> 
> Utkarsh
> 
> On Thu, Jul 11, 2013 at 6:23 AM, Biddiscombe, John A. <biddisco at cscs.ch>
> wrote:
> > One of the features I have an intern working on - and I need, is the
> > ability to use Gradient Opacity for volume rendering. I had a plugin
> > which enabled this, using a 2D transfer function editor (stolen from
> > visit again, like the point sprite stuff, but I ended up having to
> > rewrite most of it)
> >
> > Could you please make it easy for me to hook this kind of feature into the
> standard colour editor? rather than having to redo it all in the plugin.
> >
> > None of it compiles at all right now as it was last used in 2010 and the server
> manager and everything has been completely changed. I asked about this on
> the list a week or so ago, but now I see from looking at the code that the vol-
> render plugin I made is obsolete as the one in paraview does camera aligned
> slices etc, All I need to do is expose the gradient opacity features and hook
> my editor into them. (It does histograms and stuff too inside the editor, but
> probably there's a vtk2DTransferFunction Widget somewhere we could use
> instead).
> >
> > Etc etc, just thinking out loud.
> >
> > JB
> >
> >> -----Original Message-----
> >> From: paraview-developers-bounces at paraview.org [mailto:paraview-
> >> developers-bounces at paraview.org] On Behalf Of Utkarsh Ayachit
> >> Sent: 10 July 2013 20:24
> >> To: burlen
> >> Cc: ParaView Developers
> >> Subject: Re: [Paraview-developers] Color Scale Editor Design
> >>
> >> Burlen,
> >>
> >> > 1) combine the opacity widget and the color scale widget.
> >>
> >> Good idea! Let me see how much effort that's going to be. Hopefully,
> >> it's not too bad to add support for this.
> >>
> >> > I think it would also be very useful to display a histogram of the
> >> > active scalar
> >> plotted using the LUT colors in the new widget.
> >>
> >> We have thought of this in the past. As useful that this is, it's a
> >> bit tedious to implement. I'll put that as a feature request to be
> >> addressed in future for now.
> >>
> >> > 2) add a "mirror scale" option.
> >>
> >> Should be too hard to add.
> >>
> >>
> >> > Also, with the current color scale widget it's pretty difficult to
> >> > interactively
> >> manipulate LUT's with many color points (eg when 256 colors are
> >> explicitly specified). The control points are too close together to
> >> select and they way it's implemented now you'd need to move
> >> surrounding control points as well.
> >>
> >> Burlen, for such cases you may want to look into using the newly
> >> added "categorical color" support rather than adding 256 control points.
> >>
> >>
> >> > 3) limit the number of control points used by the widget. The
> >> > default max
> >> number of control points used by the widget would be something
> >> reasonable like 16 but the user could increase if desired via a qt spin
> control.
> >> The active control points in the widget would be evenly spaced across
> >> the scale and during interaction as the user moves the visible
> >> control points the widget would handle linearly re-interpolating the
> >> position of the hidden control points automatically.
> >>
> >> I'm not sure I follow the need for this. With support for categorical
> >> colors, some of the use-cases with large number of control points may
> >> become unnecessary.
> >>
> >> Utkarsh
> >> _______________________________________________
> >> Paraview-developers mailing list
> >> Paraview-developers at paraview.org
> >> http://public.kitware.com/mailman/listinfo/paraview-developers


More information about the Paraview-developers mailing list