Picon
Favicon

I: ROI


>----Messaggio originale----
>Da: valentina-fin <at> libero.it
>Data: 25/01/2012 11.48
>A: <marsbar-users <at> lists.sourceforge.net>
>Ogg: ROI
>
>
>
>>
>>hello MarsBaR experts,
>>I'm writing you because I would need to ask your help on MarsBaR
>>I  want to knwn if it is possible extract one or more ROI made of a fixed 
>>volume of oriented parallelepiped (box) that is not necessary parallel to 
>>planes of image; each box must have voxel information that we have after co-
>>registration (i.e. we must keep analogous information). In detail  I want 
to 
>>select hyppocampus. Is it possible using MarsBaR?
>>Would you be so kind to give me some indication of where I can find this 
>>information please?
>>I would be very grateful if you could suggest me some articles or function 
>>that will help me in my research. Thank you very much.
>>Thank you very much for your time.
>>
>>
>>
>>Kind Regards
>>Valentina 
>>
>>
(Continue reading)

Chris McNorgan | 2 Feb 18:32
Picon

loading an existing .nii file using maroi_image

Hi all,

I'm working on a utility script to enumerate all the clusters in an 
arbitrary .nii file (most likely binarised) and get the centers of mass 
and volume for each of them. It looks like marsbar has the necessary 
tools. Step one is loading the .nii file, which is where I am stuck:

     file_root='/path/to/file';
     thisvolfilename = 'filename.nii';
     vol_file = fullfile(file_root, thisvolfilename);
     fname=vol_file
     %load the volume
     IMG = maroi_image(fname);

executing the snippet (using real file names in a real filesystem):

fname =

/mnt/ldata/Seimens/language/crossmodal/ROIS/LFG.nii

??? Warning: Struct field assignment overwrites a value with class "char".
  See MATLAB 7.0.4 Release Notes, Assigning Nonstructure Variables As 
Structures Displays Warning for details.
 > In maroi_image.maroi_image at 34
   In getcom at 29
??? Undefined function or method 'spm_get' for input arguments of type 
'char'.

Error in ==> my_roifname at 22
roifname = spm_get('cpath', roifname);
(Continue reading)

Matthew Brett | 2 Feb 18:44
Picon
Gravatar

Re: loading an existing .nii file using maroi_image

Hi,

On Thu, Feb 2, 2012 at 5:32 PM, Chris McNorgan <chris.mcnorgan <at> gmail.com> wrote:
> Hi all,
>
> I'm working on a utility script to enumerate all the clusters in an
> arbitrary .nii file (most likely binarised) and get the centers of mass
> and volume for each of them. It looks like marsbar has the necessary
> tools. Step one is loading the .nii file, which is where I am stuck:
>
>     file_root='/path/to/file';
>     thisvolfilename = 'filename.nii';
>     vol_file = fullfile(file_root, thisvolfilename);
>     fname=vol_file
>     %load the volume
>     IMG = maroi_image(fname);
>
> executing the snippet (using real file names in a real filesystem):
>
> fname =
>
> /mnt/ldata/Seimens/language/crossmodal/ROIS/LFG.nii
>
> ??? Warning: Struct field assignment overwrites a value with class "char".
>  See MATLAB 7.0.4 Release Notes, Assigning Nonstructure Variables As
> Structures Displays Warning for details.
>  > In maroi_image.maroi_image at 34
>   In getcom at 29
> ??? Undefined function or method 'spm_get' for input arguments of type
> 'char'.
(Continue reading)

Chris McNorgan | 2 Feb 19:31
Picon

Re: loading an existing .nii file using maroi_image


This reminds me very much of a phone call down to Roy on the IT Crowd. I 
must have snipped that very critical line out of the script I was 
working from.

Thanks, turning on marsbar does, in fact, appear to be necessary for 
marsbar to function, and including the marsbar('on') line allows the 
script to run (at least as far as I've written it).

> >  ??? Warning: Struct field assignment overwrites a value with class "char".
> >    See MATLAB 7.0.4 Release Notes, Assigning Nonstructure Variables As
> >  Structures Displays Warning for details.
> >    >  In maroi_image.maroi_image at 34
> >     In getcom at 29
> >  ??? Undefined function or method 'spm_get' for input arguments of type
> >  'char'.
>
> Did you try "marsbar('on')" at the beginning of your script?
>
> Best,
>
> Matthew

--

-- 
Chris McNorgan
Postdoctoral Research Fellow
Developmental Cognitive Neuroscience Lab
Roxelyn and Richard Pepper Department of Communication Sciences&  Disorders
Northwestern University
2240 Campus Drive
(Continue reading)

zxcv | 6 Feb 12:23
Picon
Picon

Import/Build ROI


What is the difference between building and ROI and importing one? Why are
there the two function with seemingly similar themes but very different
results?
--

-- 
View this message in context: http://old.nabble.com/Import-Build-ROI-tp33270807p33270807.html
Sent from the MarsBaR mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Matthew Brett | 7 Feb 20:09
Picon
Gravatar

Re: [SPM] Build Marsbar ROIs

Hi,

On Tue, Feb 7, 2012 at 4:55 PM, Anna Zamm <azamm <at> caregroup.org> wrote:
> Hi All,
> I would like to write a batch script that loops through a directory with 90 .img files and builds a marsbar
ROI (roi.mat) for each file.  I tried using maroi_image(filename) to do this, but Matlab gave me an error
message ('Undefined function or method 'spm_get' for input arguments of type 'char').   Any
suggestions on how to successfully batch this process would be much appreciated.
> Thanks in advance,

I think you want the marsbar mailing list for this one.

You may have omitted the line:

marsbar('on')

from your script.  This sets the paths correctly to run the rest of
the marsbar functions,

Best,

Matthew

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
(Continue reading)

Matthew Brett | 8 Feb 19:58
Picon
Gravatar

Re: Import/Build ROI

Hi,

On Mon, Feb 6, 2012 at 3:23 AM, zxcv <helen.beaumont <at> postgrad.man.ac.uk> wrote:
>
> What is the difference between building and ROI and importing one? Why are
> there the two function with seemingly similar themes but very different
> results?

The building options allow you to build single ROIs, by using shapes,
images etc.  The import options are (usually) for the situation where
there are multiple ROIs in a particular image, and you want to make
them all into roi files.

For example, if you have an image with two clusters of non-zero
voxels, and you do build ... from image, you will get one ROI
containing the two clusters.  If you do import, cluster image, then
you should get two ROIs, one for each cluster.

Best,

Matthew

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
azamm | 8 Feb 20:48
Picon

Extract ROI data using command line

Hi All,

I am trying to figure out command line for extracting ROI data from 90 ROIs (full options), using an SPM
design with 72 time-points (3 runs x 24 images/run). 

When I complete this process in the GUI, these are the steps I follow:
1.  'Extract ROI data' (full options) > Select ROIs
2.  Use SPM design > Yes 
3.  Images from > SPM design
4. Scaling from > SPM design
5. Save output to .mat file

The resulting .mat file contains five variables, Y (72x90 double), Yvar(72x90 double), block_rows (1x3
cell), descrip (lists ROIs), info (1x1 struct), regions(1x90 cell), and sumfunc('mean').  

Would anyone be able to tell me exactly how to replicate this output using command line and/or a script?

Your help would be much appreciated.

Thanks in advance, 
Anna  
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Matthew Brett | 9 Feb 18:57
Picon
Gravatar

Re: Extract ROI data using command line

Hi,

On Wed, Feb 8, 2012 at 11:48 AM,  <azamm <at> bidmc.harvard.edu> wrote:
> Hi All,
>
> I am trying to figure out command line for extracting ROI data from 90 ROIs (full options), using an SPM
design with 72 time-points (3 runs x 24 images/run).
>
> When I complete this process in the GUI, these are the steps I follow:
> 1.  'Extract ROI data' (full options) > Select ROIs
> 2.  Use SPM design > Yes
> 3.  Images from > SPM design
> 4. Scaling from > SPM design
> 5. Save output to .mat file
>
> The resulting .mat file contains five variables, Y (72x90 double), Yvar(72x90 double), block_rows (1x3
cell), descrip (lists ROIs), info (1x1 struct), regions(1x90 cell), and sumfunc('mean').
>
> Would anyone be able to tell me exactly how to replicate this output using command line and/or a script?

I think you want something like:

>> marsbar('on');
>> roi_fname = 'my_roi.mat';
>> design_fname = 'SPM.mat';
>> R = maroi(roi_fname);
>> D = mardo(design_fname);
>> Y = get_marsy(D, R, 'mean');
>> savestruct('some_data.mat', struct(Y));

(Continue reading)

Matthew Brett | 9 Feb 19:01
Picon
Gravatar

Re: Help for extracting values using Marsbar

Hi,

2012/1/20 LiuKarl <rememberer_mri <at> hotmail.com>:
> I am using Marsbar to extract values from one small blob near the edge of
> brain. It failed by showing the message below
>
>
>
> “Warning: No valid data for roi 1 (dep>hc_-45_47_-14)
>
>
>
> In xxx/spm5/toolbox/marsbarII/ <at> maroi/get_marsy.m at line 80
>
> In xxx/spm5/toolbox/marsbarII/marsbar.m at line 985
>
> ??? No appropriate methods for function block_rows.
>
> Error in ==> xxx/spm5/toolbox/marsbarII/marsbar.m
>
> On line 986  ==> marsY = block_rows(marsY, row);
>
> Error in ==> xxx/spm5/spm.m
>
> On line 1604  ==> evalin('base',CBs{v-1})
>
> ??? Error while evaluating uicontrol Callback.”
>
>
>
(Continue reading)


Gmane