help
help > RE: customize colorbar
Mar 5, 2019 05:03 PM | Chris Rorden
RE: customize colorbar
You can create your own color tables, but Surfice expects them to
be in its 'lut' folder. The benefit of this is that your color
scheme is loaded and accessible through the graphical interface as
well as with scripts. The idea with Surfice's scripts is automate
actions you can do with the graphical interface, but the script
functions do not provide features that are impossible with the
graphical interface.
The color lookup tables (clut files) are saved in the folder Resources/lut folder. If you are using MacOS, you will need to select the Surfice executable in the Finder, control-click on the icon and choose the "Show Package Contents" - this will reveal the folders.
You can create new cluts with a text editor or using MRIcroGL's color editor:
1.) To use MRIcroGL, make sure you have version 1.2. Choose Color/ColorEditor to display the graphical color editor. You can move the position of the nodes (left-right for intensity, up-down for opacity), you can double-click a node to set its color, you can command-click to add a new node, and shift click to delete a node. When you are happy with your new color scheme, alt-click the color editor and you will be asked to provide a name to save your new color scheme. The color scheme will be saved to MRIcroGL's lut folder, so at that stage you can move it to the Surfice folder. The attached image shows the color editor, and it is the same color scheme described as text below.
2.) You can also use a text editor to create new color schemes - you can start with one that is close to what you want.
a.) The [FLT] section sets default contrasts, and is only relevant for CT scans.
b.) The [INT] section allows you to define how many nodes are in your color scheme. In the example below there are three nodes.
c.) The [BYT] section sets the color intensity for each node - this is a value from 0 to 255. The first node should have a value of 0 and the last one a value of 255. In the example below the middle node is set to "67" so its intensity position is closer to the first node than the last one.
d.) The [RGBA] section defines the color Red|Green|Blue|Alpha for each of your nodes. Each component has a value in the range 0..255. In the example below the first node is full black (0,0,0) and the last node is full white (255,255,255), while the middle row is a medium red (247,128,128). The "Alpha" column influences the opacity, and this only matters for MRIcroGL, not Surfice. It is easiest to understand this using the graphical editor described above. The tradition is to set the darkest node as transparent (0) and three brightest to about 50% translucent (128). For Surfice you can set this to any value from 0..255.
[FLT]
min=0
max=0
[INT]
numnodes=3
[BYT]
nodeintensity0=0
nodeintensity1=67
nodeintensity2=255
[RGBA255]
nodergba0=0|0|0|0
nodergba1=247|128|128|114
nodergba2=255|255|255|168
The color lookup tables (clut files) are saved in the folder Resources/lut folder. If you are using MacOS, you will need to select the Surfice executable in the Finder, control-click on the icon and choose the "Show Package Contents" - this will reveal the folders.
You can create new cluts with a text editor or using MRIcroGL's color editor:
1.) To use MRIcroGL, make sure you have version 1.2. Choose Color/ColorEditor to display the graphical color editor. You can move the position of the nodes (left-right for intensity, up-down for opacity), you can double-click a node to set its color, you can command-click to add a new node, and shift click to delete a node. When you are happy with your new color scheme, alt-click the color editor and you will be asked to provide a name to save your new color scheme. The color scheme will be saved to MRIcroGL's lut folder, so at that stage you can move it to the Surfice folder. The attached image shows the color editor, and it is the same color scheme described as text below.
2.) You can also use a text editor to create new color schemes - you can start with one that is close to what you want.
a.) The [FLT] section sets default contrasts, and is only relevant for CT scans.
b.) The [INT] section allows you to define how many nodes are in your color scheme. In the example below there are three nodes.
c.) The [BYT] section sets the color intensity for each node - this is a value from 0 to 255. The first node should have a value of 0 and the last one a value of 255. In the example below the middle node is set to "67" so its intensity position is closer to the first node than the last one.
d.) The [RGBA] section defines the color Red|Green|Blue|Alpha for each of your nodes. Each component has a value in the range 0..255. In the example below the first node is full black (0,0,0) and the last node is full white (255,255,255), while the middle row is a medium red (247,128,128). The "Alpha" column influences the opacity, and this only matters for MRIcroGL, not Surfice. It is easiest to understand this using the graphical editor described above. The tradition is to set the darkest node as transparent (0) and three brightest to about 50% translucent (128). For Surfice you can set this to any value from 0..255.
[FLT]
min=0
max=0
[INT]
numnodes=3
[BYT]
nodeintensity0=0
nodeintensity1=67
nodeintensity2=255
[RGBA255]
nodergba0=0|0|0|0
nodergba1=247|128|128|114
nodergba2=255|255|255|168
Threaded View
Title | Author | Date |
---|---|---|
Allison Shapiro | Mar 4, 2019 | |
Chris Rorden | Mar 5, 2019 | |
Allison Shapiro | Mar 6, 2019 | |