View Issue Details

IDProjectCategoryView StatusLast Update
0022854Open CASCADEOCCT:VISpublic2014-11-11 12:58
ReportersanAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Target Version6.8.0Fixed in Version6.8.0 
Summary0022854: Helper methods in IVtkTools package
DescriptionIVtkTools package lacks the following helper methods that should facilitate usage of VIS classes in an application:

1. InitLookupTable() - should return vtkLookupTable instance initialized by standrad OCCT colors used in wireframe mode for different kinds of sub-shapes (free/boundary/shared edges, isolines,...)
2. SetLookupTableColor( vtkLookupTable*, color_role, color ), GetLookupTableColor( vtkLookupTable*, color_role ) - methods to get/modify colors for given type of sub-shapes.
3. InitShapeMapper() - a method to set up the initial shape mapper parameters
4. Maybe, some method to set up the shape actor and/or mapper according to the current display mode.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0024904 closedbugmaster Visualization - Integration of VIS component 

Activities

rkv

2011-12-20 12:49

developer   ~0018918

I'd suggest the following methods in IVtkTools namespace:

namespace IVtkTools {
//! Returns vtkLookupTable instance initialized by standrad OCCT colors used
//! in wireframe mode for different kinds of sub-shapes (free/boundary/shared
//! edges, isolines,...)
IVtkTools_EXPORTS vtkLookupTable* InitLookupTable();

//! Set a color for given type of sub-shapes.
IVtkTools_EXPORTS SetLookupTableColor (vtkLookupTable* lut,
                                       const IVtk_MeshType colorRole,
                                       const double r, const double g, const double b,
                                       const double a = 1);

//! Get a color for given type of sub-shapes.
IVtkTools_EXPORTS GetLookupTableColor (vtkLookupTable* lut,
                                       const IVtk_MeshType colorRole,
                                       double &r, double &g, double &b);

//! Get a color for given type of sub-shapes.
IVtkTools_EXPORTS GetLookupTableColor (vtkLookupTable* lut,
                                       const IVtk_MeshType colorRole,
                                       double &r, double &g, double &b,
                                       double &a);

//! Set up the initial shape mapper parameters.
IVtkTools_EXPORTS InitShapeMapper (vtkMapper* aMapper);
}

rkv

2011-12-21 10:23

developer   ~0018930

Following methods are implemented:
namespace IVtkTools {
//! Returns vtkLookupTable instance initialized by standrad OCCT colors used
//! in wireframe mode for different kinds of sub-shapes (free/boundary/shared
//! edges, isolines,...)
vtkLookupTable* InitLookupTable();

//! Set a color for given type of sub-shapes.
//! @param [in,out] aColorTable vtkLookupTable to set the color.
//! @param [in] colorRole type of sub-shapes to set the color.
//! @param [in] r red color component. Use [0,1] double values.
//! @param [in] g green color component. Use [0,1] double values.
//! @param [in] b blue color component. Use [0,1] double values.
//! @param [in] a the alpha value (the opacity) as a double between 0 and 1.
void SetLookupTableColor (vtkLookupTable* aColorTable,
                                       const IVtk_MeshType colorRole,
                                       const double r, const double g, const double b,
                                       const double a = 1);

//! Get a color for given type of sub-shapes.
//! @param [in] aColorTable vtkLookupTable to set the color.
//! @param [in] colorRole type of sub-shapes to set the color.
//! @param [out] r red color component as a double between 0 and 1.
//! @param [out] g green color component as a double between 0 and 1.
//! @param [out] b blue color component as a double between 0 and 1.
void GetLookupTableColor (vtkLookupTable* aColorTable,
                                       const IVtk_MeshType colorRole,
                                       double &r, double &g, double &b);

//! Get a color for given type of sub-shapes.
//! @param [in] aColorTable vtkLookupTable to set the color.
//! @param [in] colorRole type of sub-shapes to set the color.
//! @param [out] r red color component as a double between 0 and 1.
//! @param [out] g green color component as a double between 0 and 1.
//! @param [out] b blue color component as a double between 0 and 1.
//! @param [out] a the alpha value (the opacity) as a double between 0 and 1.
void GetLookupTableColor (vtkLookupTable* aColorTable,
                                       const IVtk_MeshType colorRole,
                                       double &r, double &g, double &b,
                                       double &a);

//! Set up the initial shape mapper parameters with default OCC colors.
void InitShapeMapper (vtkMapper* aMapper);

//! Set up the initial shape mapper parameters with user colors.
//! @param [in,out] aMapper mapper to initialize
//! @param [in] aColorTable a table with user's colors definition
void InitShapeMapper (vtkMapper* aMapper,
                                       vtkLookupTable* aColorTable);
}

san

2012-08-18 14:38

developer   ~0021265

The issue has been corrected and should be closed, no testing is required.

Issue History

Date Modified Username Field Change
2011-12-16 14:26 san New Issue
2011-12-16 14:26 san Assigned To => rkv
2011-12-16 14:27 san Status new => assigned
2011-12-20 12:49 rkv Note Added: 0018918
2011-12-20 12:49 rkv Assigned To rkv => san
2011-12-20 12:49 rkv Status assigned => feedback
2011-12-21 10:23 rkv Note Added: 0018930
2011-12-21 10:24 rkv Assigned To san => rkv
2011-12-21 10:24 rkv Status feedback => resolved
2011-12-21 10:24 rkv Description Updated
2011-12-26 07:39 abv Project Open CASCADE => Internal
2012-05-12 17:36 mkv Assigned To rkv => san
2012-08-18 14:38 san Note Added: 0021265
2012-08-18 14:38 san Assigned To san => bugmaster
2012-08-18 14:38 san Status resolved => reviewed
2014-09-18 09:50 abv Target Version => 6.8.0
2014-09-18 09:58 abv Category PRODUCTS:VIS => OCCT:VIS
2014-09-18 10:39 bugmaster Project Internal => Open CASCADE
2014-09-22 11:36 apn Test case number => Not needed
2014-09-22 11:36 apn Assigned To bugmaster => san
2014-09-22 11:36 apn Status reviewed => closed
2014-09-22 11:36 apn Resolution open => fixed
2014-09-22 13:12 apn Assigned To san => bugmaster
2014-09-22 13:12 apn Status closed => feedback
2014-09-22 13:12 apn Status feedback => tested
2014-09-22 13:13 apn Status tested => verified
2014-09-22 13:13 apn Relationship added related to 0024904
2014-11-11 12:45 aiv Fixed in Version => 6.8.0
2014-11-11 12:58 aiv Status verified => closed