[caret-users] Palette editing
Alex Fornito
fornitoa at unimelb.edu.au
Fri May 9 14:25:15 CDT 2008
Sorry, I can't seem to follow.
I map the volume to the PALS surface as a Paint ROI. I then get 12 options
in the paint D/C dialog, corresponding to a mapping to the 12 cases in the
PALS atlas. Is it possible to obtain one, as per the AFM option?
If I go to Attributes > Paint > Edit paint names, all I have is an option to
change one name.
After I change the name, there is no option under Attributes > Paint that
corresponds to Generate colours for paint colours without colours. The
options I have under Attributes > Paint are:
Assign nodes within displayed borders.
Cleanup paint names.
Clear all or part of paint file.
Convert pain column to paint volume.
Edit paint names.
Am I missing something?
I'm sing version Caret 5.51
Thanks again,
Alex
On 09/05/2008 17:57, "Donna Dierker" <donna at brainvis.wustl.edu> wrote:
> Hi Alex,
>
> Cool! John has added some features that make this a little easier.
>
> Go ahead and map your volume as ROI paint. If mapping to atlas doesn't
> give you the options you'd like, simply start with a spec file that has
> the PALS average fiducial surfaces in it, and map to Caret while the
> average fiducial surface is loaded.
>
> Then you won't be able to see the paint overlay yet, because no color is
> associated with the automatically assigned paint name. First, do
> Attributes: Paint: Edit Paint Names and properties to update the paint
> names to something more meaningful. Then, do Attributes: Paint:
> Generate colors for paint without colors. Save both the paint and area
> color files: The paint assigns nodes to paint names; the area color
> maps paint names to RGB colors. If you change the name of the paint,
> change it in both. If you want to do this with perl, sed, or awk,
> convert the paint file to ASCII first (using either File: Convert data
> file formats or the caret_command utility).
>
> Make sure D/C overlay/underlay surface has paint as overlay, and I like
> D/C: Paint Main : Display Color key.
>
> A capture of the mapped TTatlas is attached.
>
> Donna
>
> On 05/09/2008 11:33 AM, Donna Dierker wrote:
>> Hi Alex,
>>
>> Would you mind uploading your ROI volume
>> (http://pulvinar.wustl.edu/cgi-bin/upload.cgi)? It has been quite a
>> while since I've done this, and I know the gotchas are in this case
>> more case/data dependent than most (e.g., life will be easier if your
>> intensities increment like 1, 2, 3, rather than 5, 10, 15). Next best
>> thing is a histogram of the values.
>>
>> Meanwhile, I'll dig TTatlas out of my AFNI distribution, so I can try
>> mapping it.
>>
>> Donna
>>
>> On 05/09/2008 11:26 AM, Alex Fornito wrote:
>>> 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/r
>>>> ord
>>>>
>>>> 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.ali
>>>> gn_
>>>>
>>>> 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.PoSubCe
>>>> S~S
>>>>
>>>> UL.CeS~SUL.I
>>>> PrCeS~SUL.pITS~SUL~SUL.IFS~SUL.IPS~SUL.AOS~SUL.OTS~CENTRAL~SUL.intFS~SUL.SP
>>>> rCe
>>>>
>>>> S~SUL.FOS~SU
>>>> L.MFS~SUL.TOrbS~SUL.LOS~SUL.FMS~SUL.SFS~SUL.CoS~SUL.TOS~SUL.SupPS~SUL.RhS~C
>>>> ALC
>>>>
>>>> ARINE~MEDIAL
>>>> .WALL~SUL.CaSd~SUL.OrbS~SUL.HF~SUL.CaSv~SUL.POS~SUL.CiSmr~SUL.CiS~SUL.SSS~S
>>>> UL.
>>>>
>>>> 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
>>>>
>>>
>>>
>>
>>
>
> _______________________________________________
> 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