help > Specifying overlay colour
Showing 1-5 of 5 posts
Display:
Results per page:
Jan 29, 2021  11:01 AM | sankaritarina
Specifying overlay colour
Hello, 

Is there a way to specify my own colour (or even colour gradient) for an overlay? 

I am using the current version on Windows and all the tutorials I've seen so far look very different from my interface. Are there any tutorials for windows as well? 

Cheers!
Attachment: Capture.PNG
Jan 29, 2021  03:01 PM | Chris Rorden
RE: Specifying overlay colour
When you load an overlay, its name appears in the "Layers" box. When you select a layer, you can choose the color scheme. The screenshot uses the Scripting/Templates/basic script to load a couple of overlays. The screenshot shows the "spmMotor" map is selected, and one can then choose a preferred color.  

If you prefer scripts to the user interface, you can use the "color name" function. For example to make the first overlay blue you could write
 gl.colorname (1,"3blue")

For truly custom color schemes, see these notes:
https://github.com/rordenlab/MRIcroGL12/...
Attachment: overlay.png
Jan 30, 2021  03:01 PM | sankaritarina
RE: Specifying overlay colour
Okay, then I will have to get into scripting! 

I just tried working with the glass template, however, as soon as I run the script or try to do anything else, MRIcroGL just crashes. Is there any way to find out what's going on?
Jan 30, 2021  07:01 PM | Chris Rorden
RE: Specifying overlay colour
Hmm, I have never made MRIcroGL crash with scripts, indeed I use these to test for memory leaks and other issues.

1. What version are you using? Please make sure you are using the latest stable release [1.2.20201102](https://www.nitrc.org/projects/mricrogl).
2. What operating system are you using: MacOS, Linux or Windows?
3. Do all the example scripts in the Scripting/Templates folder work as expected? You can start using these as a basis for future scripts.
4. Can you provide a script that causes the program to crash?
5. Be aware that the "quit()" command will terminate the application. This is very useful, as it allows the command line or other programs to launch MRIcroGL, have MRIcroGL generate a bitmap, and then terminate. Calling "quit()" does not cause the program to crash, rather it shuts down gracefully as requested.
Jan 31, 2021  10:01 AM | sankaritarina
RE: Specifying overlay colour
Dear Chris, 

I was using a 1.2.2019 version on Windows 10. I have updated to the newest version and now the Glass template script works!

Are there any resources where I can learn to write my own scripts? The link to the media wiki seems to be down for me. 

Thanks for your help!