Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkKWColorPresetSelector Class Reference

a color preset selector. More...

#include <vtkKWColorPresetSelector.h>

Inheritance diagram for vtkKWColorPresetSelector:

Inheritance graph
[legend]
Collaboration diagram for vtkKWColorPresetSelector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkKWColorPresetSelector, vtkKWMenuButtonWithLabel)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void Create (vtkKWApplication *app)
virtual void PresetSelectedCallback (const char *name)
virtual void SetColorTransferFunction (vtkColorTransferFunction *p)
virtual vtkColorTransferFunction * GetColorTransferFunction ()
virtual double * GetScalarRange ()
virtual void GetScalarRange (double &, double &)
virtual void GetScalarRange (double[2])
virtual void SetScalarRange (double, double)
void SetScalarRange (double[2])
virtual int GetApplyPresetBetweenEndPoints ()
virtual void SetApplyPresetBetweenEndPoints (int)
virtual void ApplyPresetBetweenEndPointsOn ()
virtual void ApplyPresetBetweenEndPointsOff ()
virtual int AddPreset (const char *name, vtkColorTransferFunction *func, double range[2])
virtual int RemovePreset (const char *name)
virtual int RemoveAllPresets ()
virtual int AddSolidRGBPreset (const char *name, double rgb[3])
virtual int AddSolidRGBPreset (const char *name, double r, double g, double b)
virtual int AddSolidHSVPreset (const char *name, double hsv[3])
virtual int AddSolidHSVPreset (const char *name, double h, double s, double v)
virtual int AddGradientRGBPreset (const char *name, double rgb1[3], double rgb2[3])
virtual int AddGradientRGBPreset (const char *name, double r1, double g1, double b1, double r2, double g2, double b2)
virtual int AddGradientHSVPreset (const char *name, double hsv1[3], double hsv2[3])
virtual int AddGradientHSVPreset (const char *name, double h1, double s1, double v1, double h2, double s2, double v2)
virtual int AddFlagRGBPreset (const char *name, int nb_colors, double **rgb, int repeat)
virtual int GetPreviewSize ()
virtual void SetPreviewSize (int)
virtual int GetHideSolidColorPresets ()
virtual void HideSolidColorPresetsOn ()
virtual void HideSolidColorPresetsOff ()
virtual void SetHideSolidColorPresets (int)
virtual int GetHideGradientPresets ()
virtual void HideGradientPresetsOn ()
virtual void HideGradientPresetsOff ()
virtual void SetHideGradientPresets (int)
virtual void SetPresetSelectedCommand (vtkObject *object, const char *method)

Static Public Member Functions

vtkKWColorPresetSelectorNew ()

Protected Member Functions

 vtkKWColorPresetSelector ()
 ~vtkKWColorPresetSelector ()
virtual void CreateDefaultPresets ()
virtual void PopulatePresetMenu ()
virtual int HasPreset (const char *name)
virtual int AllocatePreset (const char *name)
virtual vtkColorTransferFunction * GetPresetColorTransferFunction (const char *name)
virtual int MapColorTransferFunction (vtkColorTransferFunction *source, double source_range[2], vtkColorTransferFunction *target, double target_range[2])
virtual int CreateColorTransferFunctionPreview (vtkColorTransferFunction *func, const char *img_name)

Protected Attributes

double ScalarRange [2]
vtkColorTransferFunction * ColorTransferFunction
char * PresetSelectedCommand
int PreviewSize
int HideSolidColorPresets
int HideGradientPresets
int ApplyPresetBetweenEndPoints
vtkKWColorPresetSelectorInternals * Internals

Detailed Description

a color preset selector.

This class displays a color preset selector as an option menu. Different type of presets can be enabled/disabled.

See also:
vtkKWMenuButton

Definition at line 33 of file vtkKWColorPresetSelector.h.


Constructor & Destructor Documentation

vtkKWColorPresetSelector::vtkKWColorPresetSelector  )  [protected]
 

vtkKWColorPresetSelector::~vtkKWColorPresetSelector  )  [protected]
 


Member Function Documentation

vtkKWColorPresetSelector* vtkKWColorPresetSelector::New  )  [static]
 

Reimplemented from vtkKWMenuButtonWithLabel.

vtkKWColorPresetSelector::vtkTypeRevisionMacro vtkKWColorPresetSelector  ,
vtkKWMenuButtonWithLabel 
 

void vtkKWColorPresetSelector::PrintSelf ostream &  os,
vtkIndent  indent
 

Reimplemented from vtkKWMenuButtonWithLabel.

virtual void vtkKWColorPresetSelector::SetColorTransferFunction vtkColorTransferFunction *  p  )  [virtual]
 

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual vtkColorTransferFunction* vtkKWColorPresetSelector::GetColorTransferFunction  )  [virtual]
 

Set/Get the color transfer function the preset will be applied to. Note that a color transfer function is created by default.

virtual double* vtkKWColorPresetSelector::GetScalarRange  )  [virtual]
 

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

virtual void vtkKWColorPresetSelector::GetScalarRange double &  ,
double & 
[virtual]
 

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

virtual void vtkKWColorPresetSelector::GetScalarRange double  [2]  )  [virtual]
 

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

virtual void vtkKWColorPresetSelector::SetScalarRange double  ,
double 
[virtual]
 

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

void vtkKWColorPresetSelector::SetScalarRange double  [2]  ) 
 

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

virtual int vtkKWColorPresetSelector::GetApplyPresetBetweenEndPoints  )  [virtual]
 

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

virtual void vtkKWColorPresetSelector::SetApplyPresetBetweenEndPoints int   )  [virtual]
 

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

virtual void vtkKWColorPresetSelector::ApplyPresetBetweenEndPointsOn  )  [virtual]
 

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

virtual void vtkKWColorPresetSelector::ApplyPresetBetweenEndPointsOff  )  [virtual]
 

Set/Get the scalar range along which the preset will be applied. Solid color presets will be created using two entries, one at each end of the range. Gradient, or custom presets will be scaled appropriately along the range. If ApplyPresetBetweenEndPoint is true, the preset is applied given the scalar range defined between the two end-points (if any)

virtual int vtkKWColorPresetSelector::AddPreset const char *  name,
vtkColorTransferFunction *  func,
double  range[2]
[virtual]
 

Add a color preset. A name is required, as well as a color transfer function and a range. The range specifies the scalar range of the color tfunc, and is used to store a normalized version of the color transfer function so that it can be applied to the ColorTransferFunction ivar according to the ScalarRange ivar. The color transfer function passed as parameter is not Register()'ed. Return 1 on success, 0 otherwise

virtual int vtkKWColorPresetSelector::RemovePreset const char *  name  )  [virtual]
 

Remove one (or all) color preset(s). Return 1 on success, 0 otherwise

virtual int vtkKWColorPresetSelector::RemoveAllPresets  )  [virtual]
 

Remove one (or all) color preset(s). Return 1 on success, 0 otherwise

virtual int vtkKWColorPresetSelector::AddSolidRGBPreset const char *  name,
double  rgb[3]
[virtual]
 

Add a color preset. Convenience methods to add a preset given a solid color, in RGB or HSV format.

virtual int vtkKWColorPresetSelector::AddSolidRGBPreset const char *  name,
double  r,
double  g,
double  b
[virtual]
 

Add a color preset. Convenience methods to add a preset given a solid color, in RGB or HSV format.

virtual int vtkKWColorPresetSelector::AddSolidHSVPreset const char *  name,
double  hsv[3]
[virtual]
 

Add a color preset. Convenience methods to add a preset given a solid color, in RGB or HSV format.

virtual int vtkKWColorPresetSelector::AddSolidHSVPreset const char *  name,
double  h,
double  s,
double  v
[virtual]
 

Add a color preset. Convenience methods to add a preset given a solid color, in RGB or HSV format.

virtual int vtkKWColorPresetSelector::AddGradientRGBPreset const char *  name,
double  rgb1[3],
double  rgb2[3]
[virtual]
 

Add a color preset. Convenience methods to add a gradient preset given the endpoints of the gradient, in RGB or HSV format.

virtual int vtkKWColorPresetSelector::AddGradientRGBPreset const char *  name,
double  r1,
double  g1,
double  b1,
double  r2,
double  g2,
double  b2
[virtual]
 

Add a color preset. Convenience methods to add a gradient preset given the endpoints of the gradient, in RGB or HSV format.

virtual int vtkKWColorPresetSelector::AddGradientHSVPreset const char *  name,
double  hsv1[3],
double  hsv2[3]
[virtual]
 

Add a color preset. Convenience methods to add a gradient preset given the endpoints of the gradient, in RGB or HSV format.

virtual int vtkKWColorPresetSelector::AddGradientHSVPreset const char *  name,
double  h1,
double  s1,
double  v1,
double  h2,
double  s2,
double  v2
[virtual]
 

Add a color preset. Convenience methods to add a gradient preset given the endpoints of the gradient, in RGB or HSV format.

virtual int vtkKWColorPresetSelector::AddFlagRGBPreset const char *  name,
int  nb_colors,
double **  rgb,
int  repeat
[virtual]
 

Add a color preset. Convenience methods to add a "flag" preset given the number of colors in the flag, a pointer to those colors, and the number of time the flag should be repeated in the scalar range.

virtual int vtkKWColorPresetSelector::GetPreviewSize  )  [virtual]
 

Set/Get the preview size. Each entry in the menu also displays a preview of the preset.

virtual void vtkKWColorPresetSelector::SetPreviewSize int   )  [virtual]
 

Set/Get the preview size. Each entry in the menu also displays a preview of the preset.

virtual int vtkKWColorPresetSelector::GetHideSolidColorPresets  )  [virtual]
 

Hide solid color presets.

virtual void vtkKWColorPresetSelector::HideSolidColorPresetsOn  )  [virtual]
 

Hide solid color presets.

virtual void vtkKWColorPresetSelector::HideSolidColorPresetsOff  )  [virtual]
 

Hide solid color presets.

virtual void vtkKWColorPresetSelector::SetHideSolidColorPresets int   )  [virtual]
 

Hide solid color presets.

virtual int vtkKWColorPresetSelector::GetHideGradientPresets  )  [virtual]
 

Hide gradient presets (i.e. anything that is not a solid color).

virtual void vtkKWColorPresetSelector::HideGradientPresetsOn  )  [virtual]
 

Hide gradient presets (i.e. anything that is not a solid color).

virtual void vtkKWColorPresetSelector::HideGradientPresetsOff  )  [virtual]
 

Hide gradient presets (i.e. anything that is not a solid color).

virtual void vtkKWColorPresetSelector::SetHideGradientPresets int   )  [virtual]
 

Hide gradient presets (i.e. anything that is not a solid color).

virtual void vtkKWColorPresetSelector::Create vtkKWApplication app  )  [virtual]
 

Create the widget.

Reimplemented from vtkKWMenuButtonWithLabel.

virtual void vtkKWColorPresetSelector::SetPresetSelectedCommand vtkObject *  object,
const char *  method
[virtual]
 

Set/Get the command executed when a preset a selected.

virtual void vtkKWColorPresetSelector::PresetSelectedCallback const char *  name  )  [virtual]
 

Callbacks

virtual int vtkKWColorPresetSelector::HasPreset const char *  name  )  [protected, virtual]
 

Query if there is a preset with a given name, create a preset with a given name Return 1 on success, 0 otherwise

virtual int vtkKWColorPresetSelector::AllocatePreset const char *  name  )  [protected, virtual]
 

Query if there is a preset with a given name, create a preset with a given name Return 1 on success, 0 otherwise

virtual vtkColorTransferFunction* vtkKWColorPresetSelector::GetPresetColorTransferFunction const char *  name  )  [protected, virtual]
 

Get a preset color transfer function. Return the func on success, NULL otherwise

virtual void vtkKWColorPresetSelector::CreateDefaultPresets  )  [protected, virtual]
 

Create the default presets

virtual int vtkKWColorPresetSelector::MapColorTransferFunction vtkColorTransferFunction *  source,
double  source_range[2],
vtkColorTransferFunction *  target,
double  target_range[2]
[protected, virtual]
 

Map one transfer function to another Return 1 on success, 0 otherwise

virtual int vtkKWColorPresetSelector::CreateColorTransferFunctionPreview vtkColorTransferFunction *  func,
const char *  img_name
[protected, virtual]
 

Create preview (icon/image) for a preset

virtual void vtkKWColorPresetSelector::PopulatePresetMenu  )  [protected, virtual]
 

Populate the preset menu


Member Data Documentation

double vtkKWColorPresetSelector::ScalarRange[2] [protected]
 

Definition at line 150 of file vtkKWColorPresetSelector.h.

vtkColorTransferFunction* vtkKWColorPresetSelector::ColorTransferFunction [protected]
 

Definition at line 151 of file vtkKWColorPresetSelector.h.

char* vtkKWColorPresetSelector::PresetSelectedCommand [protected]
 

Definition at line 152 of file vtkKWColorPresetSelector.h.

int vtkKWColorPresetSelector::PreviewSize [protected]
 

Definition at line 153 of file vtkKWColorPresetSelector.h.

int vtkKWColorPresetSelector::HideSolidColorPresets [protected]
 

Definition at line 154 of file vtkKWColorPresetSelector.h.

int vtkKWColorPresetSelector::HideGradientPresets [protected]
 

Definition at line 155 of file vtkKWColorPresetSelector.h.

int vtkKWColorPresetSelector::ApplyPresetBetweenEndPoints [protected]
 

Definition at line 156 of file vtkKWColorPresetSelector.h.

vtkKWColorPresetSelectorInternals* vtkKWColorPresetSelector::Internals [protected]
 

PIMPL Encapsulation for STL containers

Reimplemented from vtkKWWidget.

Definition at line 160 of file vtkKWColorPresetSelector.h.


The documentation for this class was generated from the following file:
Generated on Tue May 30 12:36:30 2006 for ParaView by doxygen 1.3.5