Oliver,
some short information taken from the code:
1) each blob will be scaled individually such that its minimum starts zero
intensity and its maximum is at full intensity. This may go wrong if there
are +/-Infs or NaNs in your blob data.
2) SPM will just cycle over all blobs and produce a coloured image by
adding the individual blobs images onto each other.
3) It is possible to manipulate the scaling by setting parameters in the
"st" structure by hand doing something like this:
global st
% Assumption: your displayed image is vols{1}
st.vols{1}.blobs{1}.min = your_min_value;
st.vols{1}.blobs{1}.min = your_min_value;
% and so on for other blobs/vols
spm_orthviews redraw
Hope this helps,
Volkmar
On Fri, 2 Jun 2006, Oliver Hulme wrote:
> dear SPMers,
>
> I recently asked a question about the colour additivity rule for adding
> multiple blobs when displaying a structural in SPM2.
> My basic problem was that i wanted to add 4 blobs such that the resultant
> colours when overlapping could unambigously
> identify which combination of blobs were overlapping. It was suggested that
> that SPM2 used an additive colour model where simply
>
> "I believe it is an additive color model. So there are only 3 colors- r, g, b
> & their various
> combinations. r+g = yellow, r+b = purple, g+b = cyan, r+g+b = white. So if you
> have a 4th color it
> will bias the overall color cast depending on the various hues.
>
> However, once something has combined to white it cannot get more white, so
> there should be no
> change with a 4th color. In practice however the blending is not perfect so I
> think 4 colors takes
> on a cast of whatever color you use. "
>
> After trying for some time without success to find a suitable 4 dimensional
> colour space which is intuitive to visually apprehend i resorted to just
> using the 3 colours where the additivity rule is straight forward.
>
> however looking at the images where all 3 r g and blue overlap, the resultant
> colour is black. maybe whether it is white or black depends on the colour mode
> SPM uses. this is not a problem ... but what i need for publication purposes
> is some reference to the formal colour mixing rule that SPM is applying.
>
> looking into the spm_orthviews code it says that SPM uses a "full colour" mode
> for adding multiple blobs....
>
>
> % spm_orthviews('AddColouredBlobs',handle,XYZ,Z,mat,colour)
> % Adds blobs from a pointlist to the image specified by the handle(s).
> % handle - image number to add blobs to
> % XYZ - blob voxel locations (currently in millimeters)
> % Z - blob voxel intensities
> % mat - matrix from millimeters to voxels of blob.
> % colour - the 3 vector containing the colour that the blobs should be
> % Several sets of blobs can be added in this way, and it uses full colour.
> % Although it may not be particularly attractive on the screen, the colour
> % blobs print well.
> % _______________________________________________________________________
> % @(#)spm_orthviews.m 2.38 John Ashburner, Matthew Brett, Tom Nichols and
> Volkmar Glauche 03/04/17
>
> however it does not say how full colour works in terms of additivity, or in
> terms of its interaction with intensity. can
> someone explain how colours add together in full colour mode, what the rule is
> for saturation/intensity scaling of each colour and how
> this interacts with the additivity rule itself.
>
> any help on this would be most appreciated.
>
> best wishes
>
> Ollie Hulme
>
>
>
> Oliver Hulme
>
> Post-doctoral research fellow
>
> Laboratory of Neurobiology
> Department of Anatomy
> University College London
> Gower Street
> London
>
> WC1E 6BT
>
> tel: 0207 679 2187
> mob: 07771 693 608
> email: [log in to unmask]
>
--
Volkmar Glauche
-
Department of Neurology [log in to unmask]
Universitaetsklinikum Freiburg Phone 49(0)761-270-5331
Breisacher Str. 64 Fax 49(0)761-270-5416
79106 Freiburg
|