Comments (5)
You can create new color lookup tables with a text editor. The format is very simple. You describe the number of nodes, each node has an intensity associated with it (the color index horizontal position). Finally, each node has a red/green/blue/alpha value associated with it. Intensity and RGBA are values in the range 0..255. To make the colormap cyclic, just make the final node have the same color (red, green and blue values) as the first node. Save the text file with the extension ".clut" and place the file in MRIcroGL's /Resources/lut
folder (for MacOS, select the MRIcroGL application and Show Package Contents
to see these folders). When you re-launch MRIcroGL it will include the new color table. Here is an example for the HSV color table:
[FLT]
min=0
max=0
[INT]
numnodes=7
[BYT]
nodeintensity0=0
nodeintensity1=43
nodeintensity2=85
nodeintensity3=128
nodeintensity4=170
nodeintensity5=213
nodeintensity6=255
[RGBA255]
nodergba0=255|0|0|0
nodergba1=255|255|0|14
nodergba2=0|255|0|28
nodergba3=0|255|255|43
nodergba4=0|0|255|57
nodergba5=255|0|255|71
nodergba6=255|0|0|85
When designing color maps, please be mindful of how people with color blindness will perceive your colors. Criticisms of the classic Matlab color maps and modern alternatives (such as the Viridis and Plasma schemes provided with MRIcroGL) are here, here and here. @CPernet provides tools for controlling luminance in color maps.
from mricrogl10_old.
Amazing answer thank you a lot! i have now created my colormap successfully and MRIcroGL is able to recognize it. One last thing.
from mricrogl10_old.
What would be the color table if I want to generate random colormap (similar to the random colormap in fsleyes, or how segmentations are loaded on ITK-SNAP)? In this case, each region of interest with a unique label will have a unique or repeated color (since I have more than 200+ ROIs).
from mricrogl10_old.
Set the intent_code of your NIfTI header to 1002 to specify NIFTI_INTENT_LABEL. This will use the same random color scheme as FSLeyes and use nearest neighbor interpolation (to solve the partial volume issue that a voxel that is a mixture of area 17 and area 19 should not be identified as area 18).
To see examples, choose any of the images listed under the File/AddAtlas menu item.
from mricrogl10_old.
You can always create your own random
color schemes, just specify a lot of nodes for your color scheme each with a distinct color. For more details on color schemes, see the NiiVue documentation which links to a live demo that allows you to experiment with color schemes.
from mricrogl10_old.
Related Issues (20)
- Feature request: Reduce edge effects with OVERLAYLOADSMOOTH HOT 5
- Bug: ColorbarSize ignored by Mosaic function HOT 2
- "Image dimensions do not make sense"? HOT 10
- Update position reporting when scrolling with keys
- Updated Release on NITRC? HOT 2
- ctrl (or cmd) Z does not undo when drawing HOT 1
- disorienting UI behavior HOT 1
- view -> extract objects close window behavior HOT 1
- view -> extract brain not cancelling on "x" click HOT 1
- Mosaic text shows up inside mosaic brain HOT 1
- Shader compiler error HOT 6
- Genertation Python modules HOT 5
- Changing default output format HOT 8
- Color when saving as bitmap becomes blue HOT 1
- Detect first positional argument as an image to open HOT 5
- Install mricrogl without Python support HOT 2
- How to convert the coronal scans into a nifti image? HOT 5
- Incorporating cividis colorscheme HOT 1
- PyInt_fromLong and PyString_fromString HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mricrogl10_old.