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
 Version 3.0 of BIAC MATLAB Tools Released
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Feb 13 2004 :  01:10:04 AM  Show Profile
BIAC MATLAB Users,

Version 3.0 of the BIAC MATLAB software has been released into \\Gall\Programs\MATLAB\BIAC\. All of the BIAC domain computers are now using the new version. Changes are detailed in \\Gall\Programs\MATLAB\BIAC\VersionHistory.txt

The most significant changes are a complete rewrite of the readmr and writemr functions and modifications of many programs to support BXH data.

BXH enabled readmr and writemr

The readmr and writemr functions have been rewritten to include the following features:
  • Read and write BXH format.

  • Automatically detect and read formats with headers. (BXH, DICOM, SignaXIMG, Signa5, Analyze7.5_SPM)

  • New "Raw" format which can be used to read other N-dimensional data formats.

  • New GUI for reading the data.

  • Return variable includes additional information (voxel size, orientation, etc).

readmr now returns a structure containing additional information about the image in addition to the voxels values themselves. The data can be accessed using .data after the variable name (e.g. srs.data) and the additional information about the image can be accessed using .info after the varaible name (e.g. srs.info). If you want to perform mathematical operations on the data itself you could do the following:
img = readmr('mydata.bxh')
meanImg = mean(img.data,4);
The new versions of readmr and writemr support the following old syntaxes for backwards compatibility with existing scripts:
[srs,name,params]=readmr(fName,xSz,ySz,zSz,cannedFormat);
[srs,name,params]=readmr(fName,xSz,ySz,zSz,hdrSz,pixelType,byteOrder,allInOne,startExt);
writemr(fName,srs);
writemr(fName,srs,cannedFormat);
The only intended backward-*in*compatible change should be the return type of readmr when called without arguments. This will not only use the new GUI, but it will also return the new mr structure. In all other respects the use of old and new calling conventions for readmr and writemr should be transparent. Please report any glitches.

readmr and writemr can now handle 4D data, so there is no need to use readtsv and writetsv anymore. These functions still exist for backwards compatibility, but readmr and writemr should be used instead.

Function support for BXH data

A number of functions have been updated to read and generate BXH data. Most notably, mrtest, tstatprofile2, splinealignmr, and qastats2 now support BXH. showsrs2 also will automatically determine the orientation and voxel size from the image if possible.

Information for software testers:
Much of this software has been available for testing in:
\\Gall\Programs\MATLAB\BIAC_ver3.0 or \\Gall\Programs\User_Scripts\alpha

If you setup your computer to use the test software in "BIAC_ver3.0", please remove the environment variable BIACMATLABROOT from your account (see topic http://www.biac.duke.edu/forums/topic.asp?TOPIC_ID=302 for instructions). If you were using the test software in "alpha", please remove this directory from your startup.m file. Both test distributions will be removed on Monday, February 16th. Any software in "alpha" which was not included in this release has been moved to \\Gall\Programs\User_Scripts\beta.

Accessing version 2.2
If you need to use the old version of the software, set your BIACMATLABROOT environment variable to \\Gall\Programs\MATLAB\BIAC_ver2.2patched

Updates
A message will be posted to this topic whenever a new fix is released for version 3.0 of the BIAC MATLAB software. Please post any problems you find to the forums.

Enjoy,
Chuck

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Feb 13 2004 :  01:33:40 AM  Show Profile
BIAC MATLAB Users,

Note: This is step is no longer necessary with MATLAB 7 and BIAC MATLAB Tools 3.0.10 (and later)

In order to read and write BXH data on Windows, you must modify your system path as follows:

(1) Open "System Control" panel
(2) Select "Environment Variables" from the "Advanced Tab"
(3) Edit/Create a variable
Variable name: PATH
Variable value (3.0.10 and later): \\Gall\Programs\MATLAB\BIAC\general
Variable value (3.0.0 - 3.0.9): \\Gall\Programs\MATLAB\BIAC\lib

We are working to remove the need for this step. Until then, you only need to modify your system path once on a Windows NT workstation and once on a Windows XP workstation.

Enjoy,
Chuck

Note that the people who were previously using the test version of this software have already set up their system path properly.

CRM 2005-02-15: Added MATLAB 7 note.
CRM 2005-02-18: Use different path for 3.0.10 and later versions.

Edited by - charles.michelich on Feb 18 2005 12:48:32 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Feb 23 2004 :  1:50:43 PM  Show Profile
BIAC MATLAB Users,

I fixed a bug in overlay2 that caused an error if the second overlay was an mrstruct (as returned by the new readmr). I also changed the default colors of EEGFig such that all of the lines will be visible in EEGad. Syam updated grablocation to find a temporary filename more robustly.

Updated file(s):
VersionHistory.txt
EEGad\EEGFig.m
general\private\grablocation.m
mr\overlay2.m


Fixes for bugs found between software releases will be merged into the "live" version of the software at \\Gall\Programs\MATLAB\BIAC\

Just fixes themselves will be put into \\Gall\Programs\MATLAB\BIAC_Patches\BIAC_ver3.0_Patches\
so that the fixes can be retrieved without getting the entire distribution again, if so desired.

Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.1

Edited by - charles.michelich on Aug 24 2004 2:12:18 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Mar 17 2004 :  5:57:25 PM  Show Profile
BIAC MATLAB Users,

I added some additional functions to the BIAC Fix Toolbox for MATLAB 5.3 to help make code written for MATLAB 6.5 backwards compatible with MATLAB 5.3. I also removed the ismember implementation from this toolbox since the changes in functionality are not necessary for our tools. A small typo in the Contents file for the BIAC Fix Toolbox for MATLAB 6.5 was also corrected.

Updated files:
VersionHistory.txt
fix\MATLAB53\Contents.m
fix\MATLAB65\Contents.m


New files:
fix\MATLAB53\true.m
fix\MATLAB53\false.m
fix\MATLAB53\isequalwithequalnans.m
fix\MATLAB53\hist.m


Deleted files and directories:
fix\MATLAB53\ismember.m
fix\MATLAB53\@cell\ismember.m
fix\MATLAB53\@cell


Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.2

Edited by - charles.michelich on Aug 24 2004 2:13:37 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Jul 26 2004 :  9:36:24 PM  Show Profile
BIAC MATLAB Users,

In order to more easily support multiple versions of MATLAB, cellfun2 and the buildmex scripts were modified to support compiling two versions with different names (cellfun2LT and cellfun2NLT) instead of compiling a separate mex file for each version of MATLAB and placing it in the appropriate fix directory. cellfun2 was also implemented as an m-file.

listgui was enhanced by Amin to support selecting multiple items. Some error messages in readmrgui were updated by Syam to be more descriptive. Syam also rewrote nargoutchk, ispc, and the SPM header reading parts of readmrhdr to replace external code with his own implementation. Finally, the comments in all of the fix toolbox functions were updated for consistency.

Updated files:
VersionHistory.txt
fix\MATLAB53\Contents.m
fix\MATLAB53\copyfile.m
fix\MATLAB53\false.m
fix\MATLAB53\hist.m
fix\MATLAB53\isequalwithequalnans.m
fix\MATLAB53\ispc.m
fix\MATLAB53\legend.m
fix\MATLAB53\nargoutchk.m
fix\MATLAB53\strfind.m
fix\MATLAB53\true.m
fix\MATLAB60\copyfile.m
fix\MATLAB60\false.m
fix\MATLAB60\hist.m
fix\MATLAB60\isequalwithequalnans.m
fix\MATLAB60\legend.m
fix\MATLAB60\strfind.m
fix\MATLAB60\true.m
fix\MATLAB61\copyfile.m
fix\MATLAB61\false.m
fix\MATLAB61\hist.m
fix\MATLAB61\isequalwithequalnans.m
fix\MATLAB61\legend.m
fix\MATLAB61\true.m
fix\MATLAB65\hist.m
fix\MATLAB65\legend.m
general\buildmex.bat
general\buildmex.m
general\buildmex.sh
general\cellfun2.c
general\cellfun2.m
general\listgui.m
mr\readmrgui.m
mr\readmrhdr.m


New files:
general\cellfun2LT.dll
general\cellfun2LT.mexglx
general\cellfun2LT.mexrs6
general\cellfun2NLT.dll


Deleted files:
fix\MATLAB61\cellfun2.dll
fix\MATLAB65\cellfun2.dll
fix\MATLAB65\cellfun2.mexglx
fix\MATLAB65\cellfun2.mexrs6


Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.3

Edited by - charles.michelich on Aug 24 2004 2:15:18 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Jul 28 2004 :  1:16:32 PM  Show Profile
BIAC MATLAB Users,

Two bugs in the Analyze7.5_SPM portion of the readmrhdr.m version posted on Monday (7/26) night have been fixed. One bug affected the handling of big-endian Analyze7.5_SPM format files and the other effected 4D Analyze7.5_SPM format files with a fourth dimension size of 1 (such as those created by SPM and IRIS). The bug was introduced at approximately 9 pm on 7/26/2004 and fixed at 12:30 pm on 7/28/2004.

Both bugs caused readmr.m to fail to read the Analyze7.5_SPM data and issue a MATLAB error (NOT return incorrect data). Therefore, any affected analyses would have failed to read the data. This could cause an analysis program to either fail with an error message or "catch" the error and handle it some other way. Any subsequent analysis steps may also have failed if the input data were missing.

Updated file:
mr\readmrhdr.m

Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.4

Edited by - charles.michelich on Aug 24 2004 2:15:51 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Jul 29 2004 :  9:33:38 PM  Show Profile
BIAC MATLAB Users,

Syam fixed a small bug in readmrhdr.m. The wrong error message was generated when attempting to read a non-Analyze7.5_SPM file as an Analyze7.5_SPM file.

Updated files:
VersionHistory.txt
mr\readmrhdr.m


Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.5

Edited by - charles.michelich on Aug 24 2004 2:16:15 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Aug 05 2004 :  12:26:51 PM  Show Profile
BIAC MATLAB Users,

Josh modified tstatprofile2 to automatically create the output folder if it does not exist. This version of tstatprofile2 also uses isunix instead of ispc for MATLAB 5.3 compatibility.

Updated files:
VersionHistory.txt
mr\tstatprofile2.m


Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.6

Edited by - charles.michelich on Aug 24 2004 2:16:36 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Aug 06 2004 :  12:04:29 PM  Show Profile
BIAC MATLAB Users,

Josh found and Syam fixed a bug in makedir. The function could return a status of success when the directory creation failed.

Updated files:
VersionHistory.txt
general\makedir.m


Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.7

Edited by - charles.michelich on Aug 24 2004 2:17:03 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Aug 20 2004 :  6:33:18 PM  Show Profile
BIAC MATLAB Users,

Several updates to the BIAC MATLAB Tools have been made to support MATLAB 7.0.

A bug in progbar.m that prevented proper display on MATLAB 7.0 was fixed. showsrs2_cfg.m was modified to use histc instead of hist so that the Mathworks version of hist does not have to be modified. overlay2.m was modified to work around a Mathworks legend bug so that the Mathworks version of legend does not have to be modified either.

Since the "fix" version of hist and legend are no longer necessary, these files were removed. The Fix Toolbox for MATLAB 6.5 was also removed since it no longer contains any functions. startup.m was modified automatically add the BIAC Fix Toolbox for the current version of MATLAB if one exists. It also was modified to remove the use of ispc for compatibility with MATLAB 5.3.

In the interest being able to identify the current patch version of the BIAC MATLAB Tools, the toolbox version numbers will be updated whenever a set of updates is released (3.0.8 for this update). You can obtain the current version number of the BIAC MATLAB Tools using the ver function.

The patches only folder, \\Gall\Programs\MATLAB\BIAC_Patches\BIAC_ver3.0_Patches\, has been removed to simplify the patching process. To help make transfering the current verion of the tools easier, the contents of \\Gall\Programs\MATLAB\ are zipped in to the following file:

\\Gall\Programs\MATLAB\BIAC_matlab_latest.zip.

To upgrade to the latest version of the BIAC MATLAB Tools, download BIAC_matlab_latest.zip and replace you current installation with the contents of this zip file.

Updated files:
startup.m
VersionHistory.txt
EEGad\Contents.m
fix\MATLAB53\Contents.m
fix\MATLAB60\Contents.m
fix\MATLAB61\Contents.m
general\Contents.m
general\progbar.m
mr\Contents.m
mr\overlay2.m
mr\showsrs2_cfg.m


Deleted files:
fix\MATLAB53\hist.m
fix\MATLAB53\legend.m
fix\MATLAB60\hist.m
fix\MATLAB60\legend.m
fix\MATLAB61\hist.m
fix\MATLAB61\legend.m
fix\MATLAB65\Contents.m
fix\MATLAB65\hist.m
fix\MATLAB65\legend.m


Deleted directories:
fix\MATLAB65

Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.8

Edited by - charles.michelich on Aug 24 2004 2:18:08 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Sep 13 2004 :  3:23:46 PM  Show Profile
BIAC MATLAB Users,

showsrs2.m was updated to fix a problem with the time series legend using MATLAB 7.

All of the changes in the "beta" version of showsrs2 were also included in this update. The most significant additions were:
  • The original coordinates, without any flips or permutes, are displayed on the time point label
  • The non-OpenGL renderer is used by default for better compatibility with some graphics cards used at BIAC
The following changes were also made. The option option to send time series data to Excel is no longer displayed on non-PC platforms since toexcel does not work on these platforms. The nargoutchk and errordlg function calls were removed.

Updated files:
VersionHistory.txt
EEGad\Contents.m
fix\MATLAB53\Contents.m
fix\MATLAB60\Contents.m
fix\MATLAB61\Contents.m
general\Contents.m
mr\Contents.m
mr\showsrs2.m


Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.9

Edited by - charles.michelich on Sep 13 2004 3:46:10 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Oct 31 2004 :  11:10:46 PM  Show Profile
BIAC MATLAB Users,

Important: Fixes bug in qastats2 that could have produced incorrect results

The version of qastats2 included in version 3.0 of the BIAC MATLAB Tools (including the later beta versions) had a bug writing the standard deviation images. Images were written using the same precision as the input data instead of as 32-bit floating point values. When calculating the QA using the raw MR data (the typical use of this function) the standad deviation images were written as 16-bit integers, thus trucating any decimal points from the standard deviations. If these images were used for addition calculations, the precision of the results would be very limited. This bug is fixed in this release. If you need to use these images, either rerun qastats2 or calculate the standard deviation images using another program. The results in the output Excel file were unaffected by this bug. Since the Excel file is all that most people use, this bug should have had a minimal impact.

Also included in this release are several updates to for MATLAB 7 compatibility. toexcel now supports the MALTAB 7 COM interface and a capitalization mistake in roidef was corrected. overlay2 and overlay2_roitool were updated to save ROIs using the MATLAB 5/6 MEX format so that ROIs drawn in MATLAB 7 can be read in earlier versions of MATLAB. progbar was updated again to keep the message centered when using MATLAB 7.

When using MATLAB 7 on Windows, it is no longer necessary to add the lib directory to the system PATH. MATLAB 7 now searches the directory of a MEX file for any necessary DLLs. A copy of the DLLs in the lib directory were placed in the general toolbox to allow this to work properly.

Updated files:
VersionHistory.txt
EEGad\Contents.m
fix\MATLAB53\Contents.m
fix\MATLAB60\Contents.m
fix\MATLAB61\Contents.m
general\Contents.m
general\toexcel.m
mr\Contents.m
mr\overlay2.m
mr\overlay2_roitool.m
mr\qastats2.m
mr\roidef.m


Added files:
general\iconv.dll
general\libxml2.dll


Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.10

Edited by - charles.michelich on Nov 04 2004 1:37:31 PM
Go to Top of Page

charles.michelich
BIAC Alum

USA
183 Posts

Posted - Feb 21 2005 :  7:52:06 PM  Show Profile
BIAC MATLAB Users,

This update incorporates a number of bug fixes and added features.

MathWorks changed how conversions to integer types are handled in MATLAB 7. Prior to MATLAB 7, when a floating point number was converted to an integer, the information after the decimal point was removed (see the fix function). In MATLAB 7, floating point numbers are rounded to the nearest integer when converting to an integer. writemr was updated so that integer outputs will be rounded for all versions of MATLAB so that the behavior is consistent. MATLAB 7 has always been doing this, so you should see no change when using MATLAB 7. If you write out floating point data using an integer pixel type, your pixel values could be different by up to 0.5 between versions 3.0.10 and 3.0.11 of the BIAC MATLAB Tools when using MATLAB 6.5.2 and earlier (e.g. golgi). A couple of small fixes were also merged in for writemr.

Josh Bizzell added a number of features to tstatprofile2. You can find more information on this at this post.

showsrs2 has a number of fixes and added features. Support was added for linking the cursors of one or more showsrs2 GUIs together. If you do not specify any arguments, you will be prompted to load a base image and overlays. See "help showsrs2" for information on using these new features. Some important fixes include support for generating a histogram for logical array inputs and transparency calculations are explicitly rounded to avoid MATLAB 7 warnings.

dmdata2bxh was changed to use a relative path for the data filename in the BXH file. overlay2 and overlay2_roitool were modified to use a more robust approach to parsing the MATLAB version. readmr was updated to allow slightly different orientations in DICOM files. roifix was modified to save ROIs using the MATLAB 5/6 MEX format so that ROIs drawn in MATLAB 7 can be read in earlier MATLAB versions. A error message string was fixed in EEGRead. MIPRead was updated to remove garbage after null terminated strings and address a new sprintf warning in MATLAB 7.

The contents of the lib directory were copied to the general directory in the previous revision. The lib directory has been removed in this revision. If you are using MATLAB 6.5.2 or earlier on Windows, you will need to update your system PATH environment variable to use the general directory instead. See the second post in this thread for instructions. Note that most of the BIAC Windows machines have been upgraded to MATLAB 7, so this change shouldn't effect many, if any, people. While not critical, you should remove the lib or general directory from your system path if you will not be using older versions of MATLAB on Windows.

See VersionHistory.txt for more detailed information on the changes.

Updated files:
VersionHistory.txt
EEGad\Contents.m
fix\MATLAB53\Contents.m
fix\MATLAB60\Contents.m
fix\MATLAB61\Contents.m
general\Contents.m
mr\Contents.m
mr\dmdata2bxh.m
mr\overlay2.m
mr\overlay2_roitool.m
mr\readmr.m
mr\roifix.m
mr\showsrs2.m
mr\showsrs2_cfg.m
mr\tstatprofile2.m
mr\writemr.m


Deleted files:
lib\iconv.dll
lib\libxml2.dll


Deleted directories:
lib

Enjoy,
Chuck

BIAC MATLAB Tools Version: 3.0.11

Edited by - charles.michelich on Apr 09 2005 3:14:25 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.59 seconds. Snitz Forums 2000