Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Analysis Software Support
 ROI analysis scripts
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

aminfar
BIAC Alum

5 Posts

Posted - Aug 11 2004 :  5:00:58 PM  Show Profile
A little information for those interested in doing roi analysis that involves either IRIS generated rois or reslicing the rois during the analysis.

There are currently two scripts for doing this:
roianalysis_count_iris - calculates (at a minimum) the amount of voxels active within a given range for each roi/slice
roianalysis_timecourse_iris - calculates (at a minimum) the percent signal change within an roi/slice

Detailed information on how to run these scripts is available in three forms for each script:

roianalysis_count_iris
1. ROIanalysisCountIRISExample - Exhaustive description of all things related to functionality and arguments
2. sample_count_iris - example script for invoking roianalysis_count_iris
3. 'help roianalysis_count_iris' - Matlab help which offers a brief description of the various arguments the function needs

roianalysis_timecourse_iris
1. ROIanalysisTimeCourseIrisExample - Exhaustive description of all things related to functionality and arguments
2. sample_timecourse_iris - example script for invoking roianalysis_timecourse_iris
3. 'help roianalysis_timecourse_iris' - Matlab help which offers a brief description of the various arguments the function needs

These files should soon be part of the regular BIAC Matlab distribution. Until then, they can be found in \\Gall\Programs\User_scripts\beta


In addition to the analysis scripts, there are others that either play important roles for analysis or assist in one way or another. These are:
1. roitoaccess - stores all data generated by one of the above analysis scripts in a Microsoft Access database. The help documents above-and particularly the exhaustive ones-explain more about how to interact with the database and why you might want to consider using one. Briefly, The timecourse and count scripts tend to produce quite a lot of data which often overruns Microsoft Excel's ~65,000 line limit. Data would then have to be spread out over quite a lot of sheets, leading to considerable difficulty in organization. More information on the functionality of roitoaccess can be found with 'help roitoaccess'. Note that the analysis scripts are already able to store data in a database without separate invocation of roitoaccess.

2. roistats_iris - does most of the heavy lifting for the analysis scripts in terms of computation. This function is usually not used on its own, though it might be useful in testing specific data.

3. join2mseg - The analysis scripts expect all rois for a subject to be stored in a single IRIS file. join2mseg takes a list of IRIS files, BIAC rois, or both, and attempts to join them into one IRIS file. The intersections of segments that overlap are split into separate segments and the user is left to decide what to do with them.

4. transfer_roidata - if an error occurs while attempting to load analyzed data into a database (i.e. disk space issues), roitoaccess will generally attempt to save the data to a .mat file (though this option can be turned off). Transfer_roidata moves the data in such a .mat file to an Access database. Note that the analysis scripts can save to a .mat file if specified for cases in which storage in an Access database or Excel file is not possible or desirable (Golgi).

5. createpivotchart - Much of the use of the analysis scripts comes through looking at analyzed data with a pivot chart or table. This function connects to an Access database and loads data into one or more Excel pivot charts. It can be configured to lay out the charts automatically. Details can be found in 'CreatePivotChartExample.'

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Aug 12 2004 :  3:01:11 PM  Show Profile
I moved all of Amin's IRIS ROI analysis tools to:
\\Gall\Programs\User_scripts\irisanalysis

Add this directory to your path if you want to use these excellent tools.

(Archived Version String = stable-aminfar-2004-08)

Edited by - charles.michelich on Aug 27 2004 5:30:38 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Aug 27 2004 :  4:52:53 PM  Show Profile
Amin fixed several bugs and added some functionality to his tools. The latest versions of his code are in:
\\Gall\Programs\User_scripts\irisanalysis\

He said that these versions worked well in all of his testing, but had not been extensively used by others, so please post to the forums if you have any trouble with the new version.

You can also access the old version from the following directory if you need to:
\\Gall\Programs\User_scripts\irisanalysis\old\

If no one posts any problems with new version, the old version will be removed.

(Archived Version String = UserScripts-20040827)

Edited by - charles.michelich on Aug 27 2004 5:30:53 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Sep 16 2004 :  1:37:53 PM  Show Profile
On 9/1/2004, I updated roistats_iris to fix a bug in the matching of the anchor slices to the correct ROI. This bug only caused a problem if segValues were not in ascending order. Amin's functions which call roistats_iris (roianalysis_timecourse_iris and roianalysis_count_iris) always sorted segValues so you would only have encountered this bug if you called roistats_iris in your own code (which I don't think anyone has done yet).

I also removed the requirement that the fourth dimension of the input data be labeled 't'

(Archived Version String = UserScripts-20040901)
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Sep 16 2004 :  1:40:02 PM  Show Profile
Per Mary Beth and Raj's feedback, I fixed a couple of bugs in Amin's tools. I fixed a typo in the label file not found error message in roianalysis_count_iris. I updated roianalysis_count_iris and roianalysis_timecourse_iris to automatically remove labels starting with "Label" from the label files (i.e. the IRIS default labels).

I also updated roitoaccess to allow the function to run on MATLAB 7. The function previously checked that the version was 6.5.1 before it would continue. Amin's tools have not been tested with MATLAB 7, so please check your results and post any problems to the forums.

(Archived Version String = UserScripts-20040916)
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Sep 16 2004 :  8:00:31 PM  Show Profile
I fixed another typo in the error handling code. roianalysis_timecourse_iris and roianalysis_count_iris listed the wrong error message when an ROI file could not be read. This fixes the problem Mary Beth reported in the third message of this topic.

(Archived Version String = UserScripts-20040916b)
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Sep 17 2004 :  3:10:18 PM  Show Profile
I fixed roistats_iris to handle the case when there are no regions in an ROI. This fixes the problem Mary Beth reported in the fifth message of this topic.

I also updated the code that checks if the orientation of the ROIs and the data are the same. An error will now occur if the RAS flags are different (the previous version just issued a warning). A warning will be shown if the RAS flags (cardinal planes) are the same but the orientations (specifically, the oblique angle) are different.

Since IRIS only saves the cardinal plane of the data, you will get this warning message if you draw an ROI in IRIS on an oblique image and save it with a BXH header.

This warning can also occur when the number of slices in the anatomical and function data are not the same (e.g. anatomicals have twice the number of slices and the functionals). Due to the way that slices are prescibed on Signa, the data is shifted in the slice direction by the functional slice thickness minus the anatomical slice thickness.

(Archived Version String = UserScripts-20040917)
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Sep 22 2004 :  5:31:13 PM  Show Profile
I fixed a small bug in roistats_iris introduced in the last version. If your ROI did not have orientation information (such as those saved in the Analyze 7.5 format), the function still tried to call getorientation which issued an error and exited the program. This fixes the problem Chris reported in the seventh message of this topic.

(Archived Version String = UserScripts-20040922)

Edited by - charles.michelich on Sep 22 2004 5:36:42 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Sep 22 2004 :  5:54:49 PM  Show Profile
I fixed a typo in roistats_iris introduced in the last version (20 minutes ago). This fixes the problem Gunes reported in the ninth message of this topic.

If you saw the following warning between 5:20 and 5:55 pm today, you should rerun the ROI analysis to make sure that the cardinal planes were the same.

Orientations for FILENAME and mseg do not match!
(They are the same cardinal plane, but have a different oblique angle)


(Archived Version String = UserScripts-20040922b)

Edited by - charles.michelich on Sep 22 2004 6:07:09 PM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.42 seconds. Snitz Forums 2000