Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Support Forums
 Analysis Software Support
 showsrs2 tips and tricks

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
josh.bizzell Posted - Mar 17 2006 : 4:43:51 PM
Below are some Matlab commands users can add to display scripts or type on the command line to manually change properties of the showsrs2 figure window.


- Change the title of your showsrs2 window
This command will change the title of the active showsrs2 figure to "Patients vs Controls - Targets".
set(gcf,'Name','Patients vs Controls - Targets');


- Go straight to the 3 orthogonal plane view
Before you can go straight to the orthogonal view, you have check to see if voxel size and orientation information have been loaded with the "if" statement below.
if strcmpi(get(findobj(gcf,'Tag','ThreePlaneOrientMenu'),'Enable'),'on')
  showsrs2('ChangeOrientMenu_Callback',findobj(gcf,'Tag','ThreePlaneOrientMenu'));
end


- Don't show the legend
set(findobj(gcf,'Tag','ShowLegendMenu'),'Checked','off');


- Manually set the limits of the time plot Y-axis
For this to work, the showsrs2 window must be in orthogonal view mode. This will set the Y-axis limits to the values in "yAxisRange" and will disable automatic rescaling of the Y-axis.
yAxisRange = [-10,30];
set(getfield(get(gcf,'UserData'),'timePlotAxes'),...
  'YLimMode','manual','YLim',yAxisRange);


- Add a vertical marker to the time plot axes
This command will put a vertical marker at the time point you specify (here, time point 5). If the Y-axis is set to automatic rescaling, you will have to run this command whenever you change the current point. Like the command above, this one only works when the showsrs2 window is in orthogonal view mode. The "axes" command will make the time plot axes the active axes, so the subsequent command will apply to it rather than the image axes.
axes(getfield(get(gcf,'UserData'),'timePlotAxes'));
xLine = line([5,5],...
  [min(getfield(get(getfield(get(gcf,'UserData'),'timePlotAxes')),'YLim')),...
  max(getfield(get(getfield(get(gcf,'UserData'),'timePlotAxes')),'YLim'))]);

To delete the line, you just need to type:
delete(xLine)


- Add multiple vertical markers to time plot axes
You can use a "for" loop with the code above to add multiple markers to the time plot. This code will add a marker at every X point listed in "xlinepts".
xlinepts = [3,5,14,17];
axes(getfield(get(gcf,'UserData'),'timePlotAxes'));
xlines = zeros(1,length(xlinepts));
for i = 1:length(xlinepts)
  xlines(i) = line([xlinepts(i),xlinepts(i)],...
    [min(getfield(get(getfield(get(gcf,'UserData'),'timePlotAxes')),'YLim')),...
    max(getfield(get(getfield(get(gcf,'UserData'),'timePlotAxes')),'YLim'))]);
end

To delete all markers:
for i = 1:length(xlines)
  delete(xlines(i));
end


If you know of any other commands or have any questions, please add them to this thread.

-Josh Bizzell
5   L A T E S T    R E P L I E S    (Newest First)
josh.bizzell Posted - May 08 2007 : 3:22:09 PM
Brian,
I haven't tested it, but I'm guessing the following would put a line at Y=5:

axes(getfield(get(gcf,'UserData'),'timePlotAxes'));
yLine = line([min(getfield(get(getfield(get(gcf,'UserData'),'timePlotAxes')),'XLim')),...
  max(getfield(get(getfield(get(gcf,'UserData'),'timePlotAxes')),'XLim'))],...
  [5,5]);

To delete the line:

delete(yLine);
marion Posted - May 08 2007 : 3:15:17 PM
Is there any way to tell it to display horizontal lines (to compare amplitudes) from within a script?

Thanks,
-Brian
josh.bizzell Posted - Mar 23 2006 : 3:42:35 PM
Here's another:

- Flip the data without using flipdim
This will let you flip your data in any direction without explicitly using the "flipdim" on your data before displaying with showsrs2. If you have used BXH files with the correct orientation information to load your data, you probably won't need to use these commands.
It's probably obvious, but here are the descriptions of the fields to change:

'FlipMenuSI' - Will flip superior-inferior axes
'FlipMenuAP' - Will flip anterior-posterior axes
'FlipMenuRL' - Will flip right-left axes
showsrs2('FlipMenu_Callback',findobj(gcf,'Tag','FlipMenuSI'));
showsrs2('FlipMenu_Callback',findobj(gcf,'Tag','FlipMenuAP'));
showsrs2('FlipMenu_Callback',findobj(gcf,'Tag','FlipMenuRL'));

- Josh
josh.bizzell Posted - Mar 23 2006 : 11:06:38 AM
Gabriel,
This command should do what you want:

- Move to specified time point
This command will move to a specified time point of 4D datasets; here time point 5.
set(findobj(gcf,'Tag','TimeSlider'),'Value',5);
showsrs2('TimeSlider_Callback',findobj(gcf,'Tag','TimeSlider'));

- Josh
Dichter Posted - Mar 23 2006 : 10:35:21 AM
Is there anyway to automatically view a particular TR when looking at 4D data (e.g., displaying timepoint 5 initially instead of timepoint 1)?

BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.25 seconds. Snitz Forums 2000