You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a brain map with both positive and negative values and I would like to use slover to display it on a structural image.
My idea is to build a 3-layers slover object (layer 1: background, layer 2 & 3 will be the same file).
Layer 2 will be displayed with "hot" colors and layer 3 with "winter".
How can I control the transparency of layer 2 and 3? Both are of type "split" because "truecolour" type will display them too transparent...
My code looks like this:
obj.img(1).vol=spm_vol(structFile);
obj.img(2).vol=spm_vol(NiftiFile);
obj.img(3).vol=spm_vol(NiftiFile);
[mx1 mn1] = slover('volmaxmin', obj.img(1).vol);
[mx mn] = slover('volmaxmin', obj.img(2).vol);
% thresholds for layer 2 and 3
lowerthreshold = 0.05;
upperthreshold = max(abs(mx) , abs(mn)) / 2; % custom max value for nice visualizations
% define color map range
obj.img(1).range = [0 mx1]; % do not display negatives (if any)
obj.img(2).range=[lowerthreshold, upperthreshold]; % make symmetric
obj.img(3).range=[-lowerthreshold, -upperthreshold]; % make symmetric
% define color maps
obj.img(2).cmap='hot';
obj.img(3).cmap='winter';
% transparency and type
obj.img(1).type = 'truecolour';
obj.img(2).type = 'split';
obj.img(3).type = 'split';
paint(obj);
I have a brain map with both positive and negative values and I would like to use slover to display it on a structural image.
My idea is to build a 3-layers slover object (layer 1: background, layer 2 & 3 will be the same file).
Layer 2 will be displayed with "hot" colors and layer 3 with "winter".
How can I control the transparency of layer 2 and 3? Both are of type "split" because "truecolour" type will display them too transparent...
My code looks like this:
Results using the above code:
Results after setting
![Screenshot 2021-07-22 at 15 14 13](https://user-images.githubusercontent.com/25902670/126644816-8821fbd0-073e-456d-bfe6-d0d2da018fc8.png)
obj.img(2).type = 'truecolour'; obj.img(3).type = 'truecolour'; obj.img(2).prop = 1; obj.img(3).prop = 1;
:Desired output (like this):
![image](https://user-images.githubusercontent.com/25902670/126645043-2eb1baa2-e0c4-47e5-84d8-be982cdd53c1.png)
The text was updated successfully, but these errors were encountered: