[MINC-users] ray_trace colour maps and rendering labels
EJ Nikelski
nikelski at bic.mni.mcgill.ca
Fri Mar 26 15:47:57 EDT 2010
Hello minc-users,
Ok, for posterity and for all future Googlers who find their way to
this post, here is what I've figured out about how to create one's own
*discrete* ray_trace-friendly color map -- useful for rendering
labels. Pretty simple, when you know how ;)
(1) file type is ".ccd", so use this as an extension
(2) the first column must contain the label number, which *must* be
monotonic. That is, keep your labels in ascending order.
(3) subsequent columns are used to define the corresponding color.
This can be done in the usual way: e.g., [ r g b ], [ r g b a ], or [
blue ]. All fields are space-delimited.
(4) each label in the volume being rendered *should* have a
corresponding line in the .ccd file, else ray_trace might make
something up.
(5) unused label values do *not* need a line defined in the .ccd file.
So, if you have a .ccd range of 128, but only need 10 label values,
you need only define the 10 labels that you need.
(6) the ray_trace <min> and <max> values specified on the "-usercc"
argument, *must* have corresponding labels in the .ccd file, else
labels get unexpectedly assigned. So, if in ray_trace you say ...
>>-usercc user_map.ccd 0 127 volume.mnc -1 1.0
... then your .ccd file better have label entries for "0" and "127".
That's all that I can think of for now. If anyone has any other
suggestions, pls feel free to contribute. Now get out there and spend
your weekend creating label-friendly color maps ... I will <sigh>.
Cheers,
-Jim
On Thu, Mar 25, 2010 at 7:47 PM, Claude LEPAGE <claude at bic.mni.mcgill.ca> wrote:
> Jim,
>
>> Can I add one additional follow-up? First, for context, I've fit
>> the AAL labels (manual labeling of the colin-27 brain) to the Civet
>> model (fit to a 4-mm grid), and am now applying my subject's inverted
>> non-linear transform to the AAL volume in order to fit the labels onto
>> my subject's linear fit T1 (out of Civet). The results look good, but
>> ... the "real" values in my label volume appear to be stored as floats
>> -- or so says register, Display and postf. How do I convert my label
>> volume into simply having "real" values =3D voxel values =3D label values
>> =3D integers?
>
> Try something like:
> mincreshape -byte -image_range 0 255 -valid_range 0 255 ...
>
> Claude
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
--
=================================
Jim Nikelski, Ph.D.
Postdoctoral Research Fellow
Bloomfield Centre for Research in Aging
Lady Davis Institute for Medical Research
Sir Mortimer B. Davis - Jewish General Hospital
McGill University
More information about the MINC-users
mailing list