[caret-users] Palette editing

Alex Fornito fornitoa at unimelb.edu.au
Fri May 9 11:26:52 CDT 2008


Hi Donna,
You're right, I am trying to overlay something like the AAL, where each
'intensity' in the region corresponds to a different ROI.

I would like to load it into Caret so that each ROI gets a different colour.
It sounds like I should indeed load it as a paint rather than metric file,
although when I go to Attributes > Map Volume to Surface and load as Paint
(ROI) or probabistic data, I get 12 options in the paint selection area in
the D/C, corresponding to the mapping for each of the cases in the PALS.
When I try to visualize any of them, I can't see anything.

I would just like the AFM mapping, but there does not seem to be an option
for selecting this with Paint, as their is with metric. In the summary
before proceeding with the mapping however, it does state that AFM will be
performed.
Am I missing something?


On 09/05/2008 14:47, "Donna Dierker" <donna at brainvis.wustl.edu> wrote:

> Hi Alex,
> 
> What you describe is more like what we call a ROI paint volume, like the
> AAL map shown here:
> 
> http://http://www.sph.sc.edu/comd/rorden/template.htmlwww.sph.sc.edu/comd/rord
> en/template.html
> 
> When you map in Caret, you have the option of mapping functional as
> metric, or Paint (ROI); you want the latter.
> 
> The tricky bit is that NIfTI (to my imperfect knowledge) doesn't yet
> support incoding of ROI lookup tables.  (John will correct me if I'm
> wrong.)  The only two ways I know to do this, using Caret, are with
> WUNIL 4dfp ifh files, or with AFNI volumes, using a VElab (non-standard)
> LUT tag in the HEAD file.  An example of the latter is in the Sept 2006
> tutorial dataset http://sumsdb.wustl.edu/sums/directory.do?id=6585200):
> 
> CARET_TUTORIAL_SEPT06/PALS_B12.B1-12.BOTH-HEMS.PROB-ATLAS_IDsulci.paint.align_
> 222+orig.HEAD
> 
> type  = string-attribute
> name  = LUT_NAMES
> count  = 423
> '???~???_not_used~GYRAL~SUL.STS~SUL.AS~SUL.SF~SUL.ITS~SUL.PoCeS~SUL.PoSubCeS~S
> UL.CeS~SUL.I
> PrCeS~SUL.pITS~SUL~SUL.IFS~SUL.IPS~SUL.AOS~SUL.OTS~CENTRAL~SUL.intFS~SUL.SPrCe
> S~SUL.FOS~SU
> L.MFS~SUL.TOrbS~SUL.LOS~SUL.FMS~SUL.SFS~SUL.CoS~SUL.TOS~SUL.SupPS~SUL.RhS~CALC
> ARINE~MEDIAL
> .WALL~SUL.CaSd~SUL.OrbS~SUL.HF~SUL.CaSv~SUL.POS~SUL.CiSmr~SUL.CiS~SUL.SSS~SUL.
> SubPS~SUL.Ol
> fS~SUL.ILS~SUL.SRS~SUL.ISS~SUL.MPrCeS~SUL.PaCeS~SUL.IRS~SUL.LuS~
> 
> Here, the ordinal position of the ROI/paint name corresponds to the
> intensity value in the volume.
> 
> You then map these paint names to RGB colors using an ordinary Caret
> area color file.
> 
> Donna
> 
> On 05/08/2008 10:44 AM, Alex Fornito wrote:
>> Hi,
>> Thanks for the feedback, although I need it to overlay a volume on the
>> surface. I essentially have a volume-based template comprising several
>> thousand ROIs, with each ROI being assigned a distinct 'intensity'. I have
>> imported the volume-based template into Caret as a metric file, and would
>> like to be able to visualize it such that each volume 'intensity'
>> (corresponding to a different ROI) is a different colour.
>> I imagine the appearance would be much like the image you sent, but somewhat
>> coarser, since its not a nodal resolution.
>>> From what I understand, a paint file can't be used to colour code a metric
>> file?
>> Is there another way of achieving my goal that I'm unaware of?
>> 
>> Thanks again,
>> Alex
>> 
>> 
>> 
>> On 06/05/2008 15:13, "John Harwell" <john at brainvis.wustl.edu> wrote:
>> 
>>   
>>> Alex,
>>> 
>>> If you generated a palette file with that many colors I think it would
>>> be slow to load and slot to make the color assignments.  A better
>>> alternative is to use this python script to generate an RGB paint file
>>> containing random colors.  You will need to adjust the "numberOfNodes"
>>> variable in the script to match your dataset.
>>> 
>>> ----------------------------------------------------------------------------
>>> --
>>> ----------------------------
>>> 
>>> #!/usr/bin/python
>>> #
>>> # Create an RGB paint file with random colors
>>> #
>>> import os
>>> import random
>>> import sys
>>> 
>>> #
>>> # Name of RGB Paint file and number of nodes in the file
>>> #
>>> rgbPaintFileName = "random.RGB_paint"
>>> numberOfNodes    = 71723
>>> 
>>> #
>>> # Create an RGB paint file with random colors
>>> #
>>> file = open(rgbPaintFileName, 'w')
>>> file.write("tag-version " + str(2) + "\n")
>>> file.write("tag-number-of-nodes " + str(numberOfNodes) + "\n")
>>> file.write("tag-number-of-columns  " + str(1) + "\n")
>>> file.write("tag-BEGIN-DATA\n");
>>> for i in range(numberOfNodes):
>>>     node  = str(i)
>>>     red   = str(random.random() * 255.0)
>>>     green = str(random.random() * 255.0)
>>>     blue  = str(random.random() * 255.0)
>>>     line = node + " " + red + " " + green + " " + blue + "\n"
>>>     file.write(line)
>>> 
>>> file.close()
>>> 
>>> ----------------------------------------------------------------------------
>>> --
>>> ----------------------------
>>> 
>>> 
>>> 
>>> 
>>> -----------------------------------
>>> John Harwell
>>> john at brainvis.wustl.edu
>>> 
>>> Department of Anatomy and Neurobiology
>>> Washington University School of Medicine
>>> 660 S. Euclid Ave   Box 8108
>>> Saint Louis, MO 63110
>>> 
>>> 
>>> 
>>> 
>>> On May 6, 2008, at 4:46 AM, Alex Fornito wrote:
>>>     
>>>> Hi,
>>>> I need to generate a custom palette for viewing some masks. I need
>>>> it to
>>>> contain 5000-10000 colours, in no particular order or pattern. I.e.,
>>>> they
>>>> can be random, they just need to provide some kind of visual
>>>> distinction
>>>> between 5000-10000 points on the cortical surface. I can see how to
>>>> manually
>>>> edit palettes, but it does not seem feasible to repeat the process
>>>> 1000s of
>>>> times. Is there a simple way to generate a palette with several
>>>> 1000s of
>>>> random colours so that it can be used in Caret?
>>>> Thanks for your help,
>>>> Alex
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> caret-users mailing list
>>>> caret-users at brainvis.wustl.edu
>>>> http://brainvis.wustl.edu/mailman/listinfo/caret-users
>>>> 
>>>>       
>>> _______________________________________________
>>> caret-users mailing list
>>> caret-users at brainvis.wustl.edu
>>> http://brainvis.wustl.edu/mailman/listinfo/caret-users
>>>     
>> 
>>   
> 
> _______________________________________________
> caret-users mailing list
> caret-users at brainvis.wustl.edu
> http://brainvis.wustl.edu/mailman/listinfo/caret-users

-- 

Alex Fornito
CJ Martin Post-Doctoral Fellow
Brain Mapping Unit
Department of Psychiatry
University of Cambridge
Addenbrooke¹s Hospital
Hills Rd, Cambridge
UK CB2 2QQ

Email:    af397 at cam.ac.uk
Phone:    +44 (0) 1223 336587
Fax:        +44 (0) 1223 336581

Australian Details:

Melbourne Neuropsychiatry Centre
National Neuroscience Facility
Levels 1 & 2, Alan Gilbert Building
161 Barry St 
Carlton South 3053
Victoria, Australia

Email:    fornitoa at unimelb.edu.au
Phone:    +61 3 8344 1861
Fax:        +61 3 9348 0469






More information about the caret-users mailing list