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

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 - Jan 05 2005 : 11:37:29 AM
I was recently asked to document a Matlab function I have written that will link the cursors of two showsrs2 windows. The function I have is called showsrs2linked, and is in \\Gall\Programs\User_Scripts\beta\ (NOTE: There is a beta version of showsrs2 in this folder, so if you add this folder to the top of your path in Matlab, most likely you'll be using this beta version.)

Example:

anat = readmr('\\Server\Data\Study.01\Anat\Sub1\anat.bxh');
tmap1 = readmr('\\Server\Data\Study.01\Analysis\Sub1\tmap1.bxh');
tmap2 = readmr('\\Server\Data\Study.01\Analysis\Sub1\tmap2.bxh');
tsv1 = readmr('\\Server\Data\Study.01\Analysis\Sub1\Avg_1.bxh');
tsv2 = readmr('\\Server\Data\Study.01\Analysis\Sub1\Avg_2.bxh');
fig1 = showsrs2(anat,tmap1,tsv1);
fig2 = showsrs2(anat,tmap2,tsv2);
showsrs2linked(fig1,fig2);

There is also a more advanced example in the showsrs2linkedscript in the same folder.

Also, it is important to note that this function will only link the cursor in figure2 to figure1, but not vice versa. Thus, clicking anywhere on the image in figure2 will not update figure1.

Please let me know if you find any bugs or have any questions.
-Josh
4   L A T E S T    R E P L I E S    (Newest First)
charles.michelich Posted - Jan 10 2005 : 12:33:53 PM
Evan,

The version I modified is in \\Gall\Programs\User_Scripts\beta\.

A message will be posted to the thread for the current BIAC MATLAB Tools distribution (currently here) anytime a change is made to the main distribution in \\Gall\Programs\MATLAB\BIAC. Provided that these modifications work well, the new version of showsrs2 will be included in the next release of the BIAC MATLAB Tools.

Enjoy,
Chuck
jamie.morris Posted - Jan 10 2005 : 12:23:52 PM
I think the newest version is in the Beta directory (based on the dates of the versions in the mr directory)....
evan.gordon Posted - Jan 10 2005 : 12:18:26 PM
Chuck,

I can't get 'LinkCursors' to work at all. I get this error:

??? Error using ==> showsrs2
Error using ==> subsref
Attempt to reference field of non-structure array.

Isn't the version you modified saved in \\Gall\Programs\MATLAB\BIAC\mr\showsrs2.m?

Evan
charles.michelich Posted - Jan 08 2005 : 12:38:55 AM
Inspired by Josh's function, I updated showsrs2 to include linked cursors support. The functionality is the same as Josh's function, except it links the figures both ways (clicking in figure 1 updates figure 2 and clicking in figure 2 updates figure 1) and more than two figures can be linked together.

Example
anat = readmr('\\Server\Data\Study.01\Anat\Sub1\anat.bxh');
tmap1 = readmr('\\Server\Data\Study.01\Analysis\Sub1\tmap1.bxh');
tmap2 = readmr('\\Server\Data\Study.01\Analysis\Sub1\tmap2.bxh');
tmap3 = readmr('\\Server\Data\Study.01\Analysis\Sub1\tmap3.bxh');
tsv1 = readmr('\\Server\Data\Study.01\Analysis\Sub1\Avg_1.bxh');
tsv2 = readmr('\\Server\Data\Study.01\Analysis\Sub1\Avg_2.bxh');
fig1 = showsrs2(anat,tmap1,tsv1);
fig2 = showsrs2(anat,tmap2,tsv2);
fig3 = showsrs2(anat,tmap3);
showsrs2('LinkCursors', [fig1 fig2 fig3])
Please post to this thread if you find any problems.
-Chuck

P.S. If you have trouble with this function, just add
\\Gall\Programs\User_Scripts\beta\oldlinked to your path to use Josh's code and the old version of showsrs2.

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