| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0001402 | VTK | (No Category) | public | 2004-12-07 14:43 | 2016-08-12 09:54 | ||||
| Reporter | Denis Shamonin | ||||||||
| Assigned To | Kitware Robot | ||||||||
| Priority | low | Severity | feature | Reproducibility | always | ||||
| Status | closed | Resolution | moved | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0001402: Converting color RGB/HSV from int to double and double to int | ||||||||
| Description | Some multiplatform GUI toolkits provides colors based on int RGB or HSV values (Qt for example) http://doc.trolltech.com/3.3/qcolor.html [^] It will be nice to have converter color RGB/HSV from int to double and double to int inside vtkMath. Example: // Description: // Convert color RGB from int to double and double to int. // The input color is not modified. static void RGBTorgb(int RGB[3], double rgb[3]) { RGBTorgb(RGB[0], RGB[1], RGB[2], rgb, rgb+1, rgb+2); } static void RGBTorgb(int R, int G, int B, double *r, double *g, double *b); static void rgbToRGB(double rgb[3], int RGB[3]) { rgbToRGB(rgb[0], rgb[1], rgb[2], RGB, RGB+1, RGB+2); } static void rgbToRGB(double r, double g, double b, int *R, int *G, int *B); // Description: // Convert color HSV from int to double and double to int. // The input color is not modified. static void HSVTohsv(int HSV[3], double hsv[3]) { HSVTohsv(HSV[0], HSV[1], HSV[2], hsv, hsv+1, hsv+2); } static void HSVTohsv(int H, int S, int V, double *h, double *s, double *v); static void hsvToHSV(double hsv[3], int HSV[3]) { hsvToHSV(hsv[0], hsv[1], hsv[2], HSV, HSV+1, HSV+2); } static void hsvToHSV(double h, double s, double v, int *H, int *S, int *V); | ||||||||
| Tags | No tags attached. | ||||||||
| Project | |||||||||
| Type | |||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0001790) Mathieu Malaterre (developer) 2004-12-09 18:47 |
I quickly browse through the page but I don't understand why we should be using int instead of unsigned char. Since the value will always be within 0-255. Any opinion ? |
|
(0001792) Denis Shamonin (reporter) 2004-12-10 05:23 |
Agree, unsigned char looks more logical. Also FLTK color model based on unsigned char http://www.fltk.org/doc-1.1/drawing.html#colors [^] |
|
(0036755) Kitware Robot (administrator) 2016-08-12 09:54 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2008-11-30 09:24 | Mathieu Malaterre | Assigned To | Mathieu Malaterre => François Bertel |
| 2008-11-30 20:22 | François Bertel | Assigned To | François Bertel => |
| 2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
| 2016-08-12 09:54 | Kitware Robot | Note Added: 0036755 | |
| 2016-08-12 09:54 | Kitware Robot | Status | expired => closed |
| 2016-08-12 09:54 | Kitware Robot | Resolution | open => moved |
| 2016-08-12 09:54 | Kitware Robot | Assigned To | => Kitware Robot |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |