I’m making a color palette using my own color lookup table to color my ROIs as I want. I made a .txt file containing index, string label, R,G,B,Alpha values for each row for each ROI. When I use MakeColorMap to convert this file into .pal , i got error messages like below. What did I do wrong? I attached a screenshot showing the error messages in the terminal window and my text file on the right.
Remove the first header line of text in the file, and make the file tab or space-delimited instead of using commas with each line looking something like this:
1 LH_Vis_1 0.470588 0.070588 0.513725 1
The format is
index label r g b 1
r, g and b values are the red, green and blue values respectively, scaled from 0 to 1.
Thanks, it worked!
One more question: Is there anyway to have a discrete set of colors instead of continuous ones? My ROI #1 gets a mixed color of black (I guess default color for index 0) and the color I set for the index 1 in my color palette. When I click the " # " below the color bar, I see values up to 20 and then **, so wondering whether there is any way I can set it to certain number larger than 20. Or any other suggestion to avoid this color mixing?
Datasets that are tagged for using an integral colormap will be colored with the discrete colormaps. You can set that in the header of the dataset with
3drefit -cmap INT_CMAP mydset.nii.gz
Alternatively, set the colormap to any colormap you like in the list (or make your own) by right-clicking on the color bar in the overlay panel and “choose colorscale”. ROI_glasbey_nnn and ROI_nnn color maps work well for colors.
AFNI will send the colors as RGB values to suma when the two programs are talking to each other, so all changes will be reflected in suma. You may have to refresh the image with a small change in the threshold or some other minor adjustment. suma has a similar set of color maps available in the Cmp menu on the right of the surface object controller (available with ctrl-s from the main suma viewer window).
By default, the RGB values AFNI sends to suma are the locations where the surface nodes intersect the voxels. There is much more control with the Vol2Surf plugin if you want to explore more. The plugin gives similar control as the 3dVol2Surf program, just interactively inside AFNI. For example, you can compute the average or the mode (more appropriate for atlas ROIs) along the line segment connecting the pial and smoothwm surfaces.
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.