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