Difference between revisions of "Documentation/Nightly/Modules/Colors"
Line 26: | Line 26: | ||
| | | | ||
− | The Colors Module manages color look up tables. | + | The Colors Module manages MRML color nodes. |
+ | |||
+ | Color nodes can contain discrete color look up tables or procedurally defined color transfer functions. | ||
Color look up tables are used by mappers to translate between an integer and a color value for display of models and volumes. | Color look up tables are used by mappers to translate between an integer and a color value for display of models and volumes. | ||
Line 34: | Line 36: | ||
# Parametric tables, defined by an equation, such as the fMRIPA table. | # Parametric tables, defined by an equation, such as the fMRIPA table. | ||
# Discrete tables, such as those read in from a file. | # Discrete tables, such as those read in from a file. | ||
+ | |||
+ | Color transfer functions are used to map scalar values, which can be integers or float/double numbers, into color values for display of models and volumes. | ||
<!-- | <!-- | ||
You can specify a directory from which to read color files using the Edit -> Application Settings window, Module Settings frame, in the User defined color file paths section. --> | You can specify a directory from which to read color files using the Edit -> Application Settings window, Module Settings frame, in the User defined color file paths section. --> | ||
− | You can create a duplicate of a color table to allow editing the names, values and color by clicking on the [[image:Slicer43-Colors-FolderPlus.jpeg]] icon next to the drop down | + | You can create a duplicate of a color table to allow editing the names, values and color by clicking on the [[image:Slicer43-Colors-FolderPlus.jpeg]] icon next to the drop down menu of color table nodes. You can then save the new color table via the File -> Save interface. |
You can load a color table file from the File -> Add Data dialog. | You can load a color table file from the File -> Add Data dialog. | ||
===File format=== | ===File format=== | ||
− | The color file format is a plain text file with the .txt or .ctbl extension. Each line in the file has: | + | The color table file format is a plain text file with the .txt or .ctbl extension. Each line in the file has: |
label name R G B A | label name R G B A | ||
Line 55: | Line 59: | ||
2 tumor 255 128 0 255 | 2 tumor 255 128 0 255 | ||
... | ... | ||
+ | |||
+ | A procedurally defined color node has the file extension .txt (coming soon: an xm version with the extension .cxml). It defines a number of points in a color transfer function using the following format: | ||
+ | |||
+ | position R G B | ||
+ | |||
+ | position is a floating point number that defines the scalar range over which the mapping is valid. RGB are color values from 0.0 to 1.0. | ||
===Custom LUTs=== | ===Custom LUTs=== | ||
Line 102: | Line 112: | ||
** [[image:TintCoolTint2.png]] CoolTint2: A scale from white to blue, 256 colors, ramp of cool colors with variations in saturation that's complementary to WarmTint2 | ** [[image:TintCoolTint2.png]] CoolTint2: A scale from white to blue, 256 colors, ramp of cool colors with variations in saturation that's complementary to WarmTint2 | ||
** [[image:TintCoolTint3.png]] CoolTint3: A scale from white to magenta, 256 colors, ramp of cool colors with variations in saturation that's complementary to WarmTint3 | ** [[image:TintCoolTint3.png]] CoolTint3: A scale from white to magenta, 256 colors, ramp of cool colors with variations in saturation that's complementary to WarmTint3 | ||
+ | * Continuous | ||
+ | ** [[image:ContinuousRedGreenBlue.tiff]] RedGreenBlue: A scale defined from -6.0 to 6.0 that maps to a rainbow from Red to Blue through green. | ||
* FreeSurfer | * FreeSurfer | ||
** [[image:FreeSurferHeat.png]] Heat: The Heat FreeSurfer color table, shows hot spots with high activation | ** [[image:FreeSurferHeat.png]] Heat: The Heat FreeSurfer color table, shows hot spots with high activation | ||
Line 167: | Line 179: | ||
| | | | ||
* Display panel: | * Display panel: | ||
− | ** | + | **Colors: a drop down menu from which to select from the list of loaded color nodes |
**[image:Slicer43-Colors-FolderPlus.jpeg]] Copy Color Node button: Duplicate the current color table to edit the color entrees as built-in color tables don't allow user editing. | **[image:Slicer43-Colors-FolderPlus.jpeg]] Copy Color Node button: Duplicate the current color table to edit the color entrees as built-in color tables don't allow user editing. | ||
**Number of Colors: the number of colors in the currently selected table. | **Number of Colors: the number of colors in the currently selected table. |
Revision as of 20:31, 13 November 2014
Home < Documentation < Nightly < Modules < Colors
For the latest Slicer documentation, visit the read-the-docs. |
Introduction and Acknowledgements
| |||||||
|
Module Description
The Colors Module manages MRML color nodes. Color nodes can contain discrete color look up tables or procedurally defined color transfer functions. Color look up tables are used by mappers to translate between an integer and a color value for display of models and volumes. Slicer supports three kinds of tables:
Color transfer functions are used to map scalar values, which can be integers or float/double numbers, into color values for display of models and volumes.
You can load a color table file from the File -> Add Data dialog. File formatThe color table file format is a plain text file with the .txt or .ctbl extension. Each line in the file has: label name R G B A label is an integer, name a string, and RGBA are 0-255. File example: # Comments if the line start with # 0 air 0 0 0 0 1 bone 255 255 255 255 whatever after the Alpha value is discarded 2 tumor 255 128 0 255 ... A procedurally defined color node has the file extension .txt (coming soon: an xm version with the extension .cxml). It defines a number of points in a color transfer function using the following format: position R G B position is a floating point number that defines the scalar range over which the mapping is valid. RGB are color values from 0.0 to 1.0. Custom LUTsYou can create custom LUTs by creating a table with the colors on the wiki, saving to file and then loading them into Slicer. CategoriesThe colors are divided up into categories:
|
Use Cases
The Colors module Dispay panel can be popped up as a stand alone widget and used to select colors in other modules of Slicer4.
- The Models module uses it to select surface model colors.
- The Volumes module uses it to select color maps for label map volumes to control which colors are used to display the scalar values at each voxel
- The Editor uses it to select colors with which to paint on label map volumes.
- Select and edit colors for Charting
Tutorials
N/A
Panels and their use
A list of all the panels in the interface, their features, what they mean, and how to use them. For instance:
|
|
|
Similar Modules
- The Volumes, Editor and Models modules use the colors to adjust the display properties for label map volumes and surface models
References
Information for Developers
Section under construction. |