SCIRun User Mailing List

Text archives Help


Re: [SCIRUN-USERS] matlabinterface problem


Chronological Thread 
  • From: Dana Brooks <brooks@ece.neu.edu>
  • To: Akiko Campbell <adcampbell@shaw.ca>
  • Cc: "'Darby J Van Uitert'" <darbyb@sci.utah.edu>, scirun-users@sci.utah.edu
  • Subject: Re: [SCIRUN-USERS] matlabinterface problem
  • Date: Tue, 16 Nov 2004 22:52:17 -0500

Akiko, hi,

I believe the current version of MatlabInterface requires that you start matlab separately and invoke the matlabengine routine (I think it's mlabengine.m in ~SCIRun/src/Packages/MatlabInterface/matlab/engine, but if (see below) you actually want to go this route there are others on the list who know this better than I do and I can roust one of them out for you and get a response). Note that Matlab does not have to be on the same machine; you can include an IP address in the GUI that points SCIRun at Matlab on a remote machine.

But if as you say all you want to do is convert the .mat data into NRDD, probably Darby is right and it makes sense to see if you can get the direct routines to work and avoid actually running Matlab through the MatlabInterface module --- I believe that was designed more for actually doing work in Matlab on data that you want to also manipulate in SCIRun ...

hope this helps .... let me know if you want the details on getting the live matlab connection going and I'll find out and make sure you get a response ...

regards,

Dana

Akiko Campbell wrote:

Hi Darby,

Thank you very much for your help.  No, I don't have MATLAB on the same
machine where SCIRun is installed and that explains the problem.  In
regards to loading the converted NRRD file into BioTensor, I haven't
been very successful either (and that was the reason I wanted to see how
MatlabInterface works...).  When I load the converted NRRD data into
BioTensor, I get errors loading the data.  Here are the steps I took:

1. In SCIRun
        (a) MatlabInterface --> DataIO --> MatlabNrrdsReader --> in UI,
selected "e1.mat" (which contains 256x256x116 DOUBLE matrix called "e1"
that stores the major eigenvalues of a tensor volume) --> port 1 -->
Execute

        (b) Teem --> DataIO --> NrrdWriter --> Connected the output port
to port 1 in (a) --> Saved it as "e1.nd" and "e1.nd.nrrd".  No errors.

2. In Biotensor
        
        (a) In the Load Data tab, checked "Tensor Volumes" and selected
"e1.nrrd" which I created in step 1 (b) above.

        (b) Clicked on "Execute" and I get the following error:
************************************************************************
***
Error in Tcl Script: can't read "Teem_NrrdData_NrrdInfo_0-size3": no
such variable
        While executing
"set $mods(NrrdInfo1)-size3"
        (object "::app" method "::BioTensorApp::update_progress" body
line 85)
        invoked from within
"app update_progress [modname]$state"
        (object "::Teem_NrrdData_NrrdInfo_0" method
"::Module::update_state "body line 22)
        invoked from within
"update_state"
        (object "::Teem_NrrdData_NrrdInfo_0" method "::Module::set_state
"body line 4)
        invoked from within
"Teem_NrrdData_NrrdInfo_0 set_state Completed 0"

************************************************************************
****
At this point, BioTensor freezes, and I need to press enter in the shell
to unfreeze. After that, in the shell, there is series of:

Scirun> Redraw event dropped, mailbox full!
          Redraw event dropped, mailbox full!
          Redraw event dropped, mailbox full!
          ........


Am I doing something wrong here?

Also, out of curiosity, I tried to load some DICOM data (please note: I
can load this data in VolView) but "Loading data" runs forever, without
giving any error (I had to kill the BioTensor session after 30 minutes).

Another thing I tried was to map the original DOUBLE array to uint16
array (in "e1.mat") and created an Analyze header with makeaheader
(please note: I can load these converted Analyze data into MRIcro).
When I load this converted Analyze data into BioTensor, I get:

"ERROR: Slicing nrrd: [nrrd] nrrdSlice: slice axis 3 out of bounds (0 to
2)"
Regards,
Akiko

-----Original Message-----
From: Darby J Van Uitert [mailto:darbyb@sci.utah.edu] Sent: Tuesday, November 16, 2004 7:26 AM
To: Akiko Campbell
Cc: scirun-users@sci.utah.edu
Subject: Re: [SCIRUN-USERS] matlabinterface problem

Akiko,

Do you have matlab on your machine? I'm not very familiar with the Matlab module but I believe it starts Matlab on your machine. I don't have matlab on my machine and I get the same error.
If you just want to read in .mat files and convert them to nrrds, there are modules in the MatlabInterface package that will do that without using the matlab program. You can look at the sample network in SCIRun/src/Packages/MatlabInterface/nets/matlab_test_network.net and look specifically at the MatlabNrrdReader module.

Make sure to read the BioTensor tutorial, specifically the section on "Image Formats and Preparation" section.

http://software.sci.utah.edu/doc/User/Tutorials/BioTensor/BioTensor.htm

Thanks.

   -darby j

On Tue, 16 Nov 2004 01:10:25 -0800
 Akiko Campbell <adcampbell@shaw.ca> wrote:

Hello,

I am a new user and would like to use SCIRun’s MatlabInterface to
convert my data in .mat format into NRRD for DT visualization in
BioTensor. When I start MatlabInterface in SCIRun and type in any
simple MATLAB command, nothing happens and no message is displayed in
the Message Frame or the module’s Message Indicator. However, in the
shell, I see an error that says “matlab: command not found”. The exact
steps I took are:

(1)     MatlabInterface --> DataIO --> Matlab --> UI

(2) In the UI window, typed in
o1=rand(5,5);

(3) Clicked on “Execute” and I see the following error in the shell

scirun> sh: line 1: matlab: command not found

My system is Red Hat Linux release 9 (Shrike)

$ uname –a

Linux localhost.localdomain 2.4.20-31.9 #1 Tue Apr 13 17:38:16 EDT 2004
i686 athlon i386 GNU/Linux

$ cat /proc/version

gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

I am able to run the demo data for BioTensor and it seems the
installation was successful. If you could help me troubleshoot this
problem, I would really appreciate it.  Thank you.

Akiko Campbell


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 2004-11-01




...........................
Darby J Van Uitert
SCI Institute
University of Utah
Email: darbyb@sci.utah.edu
Phone: 301.947.6980
...........................

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 2004-11-01


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 2004-11-01



===========================================================================
== The SCIRun Users mailing list: send email to majordomo@sci.utah.edu   ==
== for more details.                                                     ==
== Please acknowledge use of SCIRun in your papers and reports:          ==
==   see http://software.sci.utah.edu/scirun-biopse_citation.bib         ==
===========================================================================




===========================================================================
== The SCIRun Users mailing list: send email to majordomo@sci.utah.edu   ==
== for more details.                                                     ==
== Please acknowledge use of SCIRun in your papers and reports:          ==
==   see http://software.sci.utah.edu/scirun-biopse_citation.bib         ==
===========================================================================





Archive powered by MHonArc 2.6.16.

Top of page