[caret-users] Palette editing
Alex Fornito
fornitoa at unimelb.edu.au
Thu May 8 10:44:51 CDT 2008
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
--
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