general-discussion > t1_preprocess failure at masking the head
Showing 1-4 of 4 posts
Display:
Results per page:
Nov 9, 2012  11:11 PM | Kangjoo Lee
t1_preprocess failure at masking the head
Dear Dr. Bellec

I also have a t1_preprocess problem when I run my pipeline.
I'm using niak-0.6.5c.

addpath(genpath('/data/aces/aces1/pbellec/public/niak-0.6.5c'));

I use the following PSOM configuration:

    opt.psom.mode = 'session';
    opt.psom.mode_pipeline_manager = 'session';
    opt.psom.time_between_checks = 0.5;

and other options don't work.

At [succ,msg] = system(cat(2,'cp ',file_name,' ',file_tmp_gz));, it is suddenly paused, so I have to Ctrl+C to force it to stop running.


This is the log file of t1_preprocessing.




....(skip)...


*****************
Masking the head
*****************
Reading T1 image /tmp//niak_tmp_t1_preprocess_subject1_448085254_babtain_fawzi_20090714_095643_7_mrit1_preprocess/babtain_fawzi_20090714_095643_7_mri_nu_stereolin.mnc ...
Deriving a loose mask of the head ...
     Intensity thresholding ... 0.70 sec
     Sieving small clusters ... 7.14 sec
     Expanding and inverting the brain ... 13.34 sec
     Finding the outside of the brain ... 1.56 sec
     Inverting and shrinking the outside of the brain ... 9.19 sec
Total time elapsed 31.933 sec.
Writting the mask in /tmp//niak_tmp_t1_preprocess_subject1_448085254_babtain_fawzi_20090714_095643_7_mrit1_preprocess/babtain_fawzi_20090714_095643_7_mri_head_stereolin.mnc ...
Reading vol1 from file /tmp//niak_tmp_t1_preprocess_subject1_448085254_babtain_fawzi_20090714_095643_7_mrit1_preprocess/babtain_fawzi_20090714_095643_7_mri_mask_stereolin.mnc ...
Reading vol2 from file /tmp//niak_tmp_t1_preprocess_subject1_448085254_babtain_fawzi_20090714_095643_7_mrit1_preprocess/babtain_fawzi_20090714_095643_7_mri_head_stereolin.mnc ...
Reading vol3 from file /data/aces/aces1/pbellec/public/niak-0.6.5c/niak-trunk-1564-1565M/template/mni-models_icbm152-nl-2009-1.0/mni_icbm152_t1_tal_nlin_sym_09a_mask_eroded5mm.mnc.gz ...


********************
Something went bad ... the job has FAILED !
The last error message occured was :
Error using ==> niak_read_vol at 229
cp: overwrite `/tmp//_niak_tmp_t1_preprocess_subject1_354724784mni_icbm152_t1_tal_nlin_sym_09a_mask_eroded5mm.mnc.gz'? ^C^C


File /data/aces/aces1/pbellec/public/niak-0.6.5c/niak-trunk-1564-1565M/commands/read_write/niak_read_vol.m at line 229
File /data/aces/aces1/pbellec/public/niak-0.6.5c/niak-trunk-1564-1565M/bricks/fmri_preprocess/niak_brick_math_vol.m at line 114
....(skip)...

************************************************
10-Nov-2012 02:24:14 : The job has FAILED
Total time used to process the job : 474.13 sec.
************************************************

ans =

     1



>>
==================================================


Would you please let me know why this happens?
Thank you in advance.
Best regards,
Kangjoo
Nov 12, 2012  10:11 AM | Kangjoo Lee
RE: t1_preprocess failure at masking the head
Now I got one, this problem is solved with a help of Alexis.

At [succ,msg] = system(cat(2,'cp ',file_name,' ',file_tmp_gz));,
it asks me to answer a confirmation question

cp: overwrite
`/tmp//_niak_tmp_t1_preprocess_subject1_354724784mni_icbm152_t1_tal_nlin_sym_09a_mask_eroded5mm.mnc.gz'?


and that's why it is paused.
This question does not appear on the command window while the pipeline is running, however,
in order to continue running, I have to type "y" in the command window.

In further steps whenever this function is called, (reading the template images)
I have to type "y" in the command window....

Finally, I revised my configuration file .cshrc.
=> alias cp 'cp -f'
     alias mv 'mv -f'
     alias rm 'rm -f'

Nov 13, 2012  01:11 PM | Kangjoo Lee
RE: t1_preprocess failure at motion_Wrun
There's an another problem.

I also changed a temporary folder by changing the variable gb_niak_tmp in niak_gb_vars.m
and the variable gb_psom_tmp in psom_gb_vars_local.m.

When it tries to read volumes in /02_preprocessedData/NIAK/intermediate/subject1/slice_timing//fmri_subject1_session1_run1_a.mnc...

It happens at converting the raw data into a minc file.

    str_raw = ['rawtominc -float -clobber -like ' hdr.like,' -input ' file_tmp ' ' file_name];
    [flag_fail,err_msg] = system(str_raw);

The log file tells me that str_raw is a "bad argument" as following:

***************************************
Within-run rigid-body motion estimation
***************************************
Source file:
/mfip/mfip1/kangjoo/Data/fMRI_data/Danser_Control_24/controls_newprotocol/BabtainF_1/02_preprocessedData/NIAK/intermediate/subject1/slice_timing//fmri_subject1_session1_run1_a.mnc
Target file:
/mfip/mfip1/kangjoo/Data/fMRI_data/Danser_Control_24/controls_newprotocol/BabtainF_1/02_preprocessedData/NIAK/intermediate/subject1/motion_correction/motion_target_subject1_session1_run1.mnc
Generating a blurred target...
Reading volumes
/mfip/mfip1/kangjoo/Data/fMRI_data/Danser_Control_24/controls_newprotocol/BabtainF_1/02_preprocessedData/NIAK/intermediate/subject1/slice_timing//fmri_subject1_session1_run1_a.mnc...


********************
Something went bad ... the job has FAILED !
The last error message occured was :
Error using ==> niak_write_minc at 166

Bad argument
"/mfip/mfip1/kangjoo/Matlab_code/tmp/niak_tmp_motion_Wrun_subject1_session1_run1_862753245_motion_correction/vol_source_model.mnc".

Usage: rawtominc [ <.output.mnc.> ] [[.<.size4.>] <.size3.>] <.size2.> <.size1.>
        rawtominc [-help]

-------------------------

Would you give me any comment please?
Thank you

Kangjoo
Nov 14, 2012  01:11 PM | Kangjoo Lee
RE: t1_preprocess failure at motion_Wrun
Problem solved.

What I have done is that 

1> I changed MATLAB configuration; file>preference>general>Deleting files
option Delete to permanently -> Move to a temporary folder

2> I added a line right before converting the raw data into a minc file in niak_write_minc.m to left hdr.like empty.

hdr.like= '';

So, the info in the header structure is used rather than the on in a model file.

Now, the job is working and I'm not sure whether this works with only 1>. Let me check.


------------
Well, it seems like that the error is not related to 1>.
Only after doing 2>, the problem was solved.