[Mne_analysis] make non reg/meg movie
Gregory Kirk
gkirk at wisc.edu
Sun Oct 5 00:42:30 EDT 2014
Hi Eric, got mne_make_movie happy with my .stc files, i was not using the ieee file format specification and only feeding it the left hemi
now it writes the movies and they play in quicktime.
my data is in the range 0.0001-0.0045 and so i need to adjust the parameters
mne_make_movie --stcin var.stc --fthresh 0.0001 --fmax 0.01 --fmid 0.005 --mov test.mov or so
but mne_make_movie spits out fmax must be > fmin ??
mne_make_movie --stcin var.stc --fthresh 0.0001 --fmax 15.0 --fmid 1.0 --mov test.mov
also gives this error
but
mne_make_movie --stcin var.stc --fthresh 0.0001 --fmax 16.0 --fmid 1.0 --mov test.mov
runs
small fly in the ointment ?
thanks
greg
On 10/03/14, Eric Larson wrote:
> Sorry for not mentioning this earlier, you can also use this MATLAB function (which comes bundled with the MNE-C tools):
>
> https://github.com/mne-tools/mne-matlab/blob/master/matlab/mne_write_stc_file.m
>
>
>
> It looks like your code is quite close, I'm not sure why it isn't working. Maybe try the above file. Also, make sure you write both -lh and -rh stc files, and have the proper number of vertices for the subject of interest (for each hemisphere).
>
>
> Eric
>
>
>
> On Fri, Oct 3, 2014 at 2:21 PM, Gregory Kirk <gkirk at wisc.edu(javascript:main.compose()> wrote:
>
> > Hi
> >
> > seemed to follow the format of the python script and wrote a matlab file
> > fid=fopen('var-lh.stc','w');
> > tmin = 1;
> > tstep = 2;
> > load my_var
> > sz = size(my_var)
> > nvert=sz(1);
> > ntime = sz(2);
> > samp_rate = tstep*1000;
> >
> > fwrite(fid,tmin,'float32');
> > fwrite(fid,samp_rate,'float32');
> > fwrite(fid,nvert,'uint32');
> > verts = [0:nvert-1];
> > fwrite(fid,verts,'uint32');
> > fwrite(fid,ntime,'uint32');
> > fwrite(fid,my_var,'float32');
> >
> > mne_make_movie --stcin var --mov test.mov
> >
> > mne_make_movie seems to think t has no verticies
> >
> > mne_make_movie version 1.34 compiled at Dec 21 2009 19:48:23
> > Create movies and tif, rgb, jpeg, png, or w files using a precomputed inverse operator decomposition
> >
> > stc input file : var
> > mov file output : test.mov
> > width x height : 600 x 400
> > QuickTime quality : 80
> > The input stc file will be assumed to contain current expectation value data
> > Subject : 001_S1
> > Visualization surface : inflated
> > Process both hemispheres
> > Magnification factor : 1.00
> > Thresholding:
> > fthresh : 8.00
> > fmid : 15.00
> > fslope : 0.20
> > fmax : 20.00
> >
> > -------------------------------------------------------------------
> >
> > 600 x 400 off-screen rendering initialized.
> > Selected view called 'lat'
> >
> > -------------------------------------------------------------------
> >
> > No vertices in stc file var-lh.stc
> >
> >
> >
> >
> > On 10/02/14, Eric Larson wrote:
> > > If you're comfortable with Python, then PySurfer will allow you to directly plot arbitrary data vectors on the cortical surface. Should be pretty easy for your use case.
> > >
> > > If you want to stick with Bash, then you can get the STC format spec from looking at the mne-python code for `SourceEstimate.save`, which calls `_write_stc`:
> > >
> > >
> > > https://github.com/mne-tools/mne-python/blob/master/mne/source_estimate.py#L72
> > >
> > >
> > >
> > > I don't think you need to supply the `--inv`, `--meas`, or `--set` parameters to `mne_make_movie` if you provide `--stcin` (since those other parameters are basically used to create a STC in memory). You'll probably also need to specify the `--subject` and the output type (e.g. `--mov`). The following command works on my system:
> > >
> > >
> > > mne_make_movie --stcin test-fsaverage-lh.stc --mov test.mov --subject fsaverage
> > >
> > >
> > >
> > > Eric
> > >
> > >
> > >
> > >
> > > On Thu, Oct 2, 2014 at 2:21 PM, Gregory Kirk <Mne_analysis at nmr.mgh.harvard.edu(javascript:main.compose() <gkirk at wisc.edu(javascript:main.compose()')" target="1">gkirk at wisc.edu(javascript:main.compose()> wrote:
> > >
> > > > Hi,
> > > >
> > > > i recently posted to free surfer list and was invited to post to this list as it seems the men may be the best way
> > > > for me to accomplish my task.
> > > >
> > > >
> > > > I want to make movies of a spatio-temporal evolution of a quantity across the cortical surface, not reg/meg.
> > > >
> > > >
> > > > i want to do it at the full resolution of the vertices on the surface, so about 300000+ for both hemispheres,there
> > > > would be 200-300 time points, so my input would
> > > > be a matrix 300000*300.
> > > >
> > > >
> > > > so looking a bit at the manual for men_make_movie ( i have used men before for reg solutions and displayed then on the cortical
> > > > surface succesfully ). would i use the --stcin option ? I would need to know the format for the stc files and skip,
> > > > --meas,--inv,--set would i need to fake these operators and input some version
> > > > of identity matrices ?
> > > >
> > > >
> > > > the threshold and such obvious parameters i remember
> > > >
> > > >
> > > > can ya help me skin this cat ?
> > > >
> > > >
> > > > g
> > > > _______________________________________________
> > > > Mne_analysis mailing list
> > > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis(java_script:main.compose('new', 't=Mne_analysis at nmr.mgh.harvard.edu(javascript:main.compose()>
> > > > <a href=)
> > > >
> > > >
> > > > The information in this e-mail is intended only for the person to whom it is
> > > > addressed. If you believe this e-mail was sent to you in error and the e-mail
> > > > contains patient information, please contact the Partners Compliance HelpLine at
> > > > http://www.partners.org/complianceline . If the e-mail was sent to you in error
> > > > but does not contain patient information, please contact the sender and properly
> > > > dispose of the e-mail.
> > > >
> > > >
> >
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu(javascript:main.compose()
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> >
> >
> >
More information about the Mne_analysis
mailing list