MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0022854Open CASCADE[OCCT] OCCT:VISpublic2011-12-16 14:262014-11-11 12:58
Reportersan 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.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
Attached Files

- Relationships
related to 0024904closedbugmaster Visualization - Integration of VIS component 

-  Notes
(0018918)
rkv (developer)
2011-12-20 12:49

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);
}
(0018930)
rkv (developer)
2011-12-21 10:23

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);
}
(0021265)
san (developer)
2012-08-18 14:38

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 View Revisions
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


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker