users > Using avg_adm
Showing 1-4 of 4 posts
Display:
Results per page:
Oct 21, 2016  02:10 PM | Diego Pacheco Pinedo - Harvard University
Using avg_adm
Hi Torsten
 
I am trying to use the avg_adm function to generate an average brain.
 
I use a command similar to the one used by Gregory Jefferies at https://github.com/jefferislab/MakeAverageBrain/blob/master/commands/avgcmdIterationPadOut.sh
 
"${REGBINDIR}/avg_adm" --verbose --cubic --ushort --auto-scale --no-ref-data \
  --pad-out 0 --output-warp "$REGROOT/average/$AVGBRAIN" \
  -o NRRD:"$REGROOT/refbrain/$AVGBRAIN.nrrd" $REGFILES
 
My command is:
 
avg_adm --verbose --cubic --ushort --auto-scale --no-ref-data --pad-out 0 --output-warp ./average/xformreference_2 -o NRRD:./treference_2.nrrd  ./registration/warp/treference_1_20160430_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160430_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160516_3_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160516_3_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160525_1_w_01_m--msde32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160525_1_wm_01_m--msde32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160603_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160603_2_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160704_2_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160704_2_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160709_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160709_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160713_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160713_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160719_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160719_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
  
And it runs till this error shows up
 
Opening studylist./registration/warp/treference_1_20160430_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160430_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160516_3_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160516_3_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160525_1_w_01_m--msde32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160525_1_wm_01_m--msde32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160603_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160603_2_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160704_2_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160704_2_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160709_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160709_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160713_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160713_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160719_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
Opening studylist./registration/warp/treference_1_20160719_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list
WARNING: image does not have valid orientation meta information; cannot reorient.
WARNING: image does not have valid orientation meta information; cannot reorient.
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 23.347892 +/- 24.816265
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 48.725335 +/- 58.158445
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 23.347892 +/- 24.816265
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 48.725335 +/- 58.158445
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 48.588272 +/- 76.374322
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.951954 +/- 65.156716
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 48.588272 +/- 76.374322
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.951954 +/- 65.156716
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 60.957827 +/- 111.316261
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.735436 +/- 65.301777
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 60.957827 +/- 111.316261
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.735436 +/- 65.301777
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 44.644204 +/- 67.600457
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 41.527533 +/- 64.808657
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 45.102641 +/- 73.079146
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.628075 +/- 65.383253
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 34.244636 +/- 43.454953
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 44.028826 +/- 62.812047
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 34.244636 +/- 43.454953
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 44.028826 +/- 62.812047
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 67.250543 +/- 128.500304
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.850115 +/- 65.239956
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 67.250543 +/- 128.500304
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.850115 +/- 65.239956
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 57.803743 +/- 112.351012
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.680439 +/- 65.334285
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 57.803743 +/- 112.351012
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.680439 +/- 65.334285
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 58.809454 +/- 115.903538
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.884848 +/- 65.226420
Before auto-rescale: [1] 40.688688 +/- 65.323116, [2] 58.809454 +/- 115.903538
After auto-rescale: [1] 40.688688 +/- 65.323116, [2] 40.884848 +/- 65.226420
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
avg_adm --verbose --cubic --ushort --auto-scale --no-ref-data --pad-out 0 --output-warp ./average/xformreference_2 -o NRRD:./treference_2.nrrd  ./registration/warp/treference_1_20160430_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160430_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160516_3_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160516_3_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160525_1_w_01_m--msde32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160525_1_wm_01_m--msde32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160603_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160603_2_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160704_2_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160704_2_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160709_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160709_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160713_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160713_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160719_1_w_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list ./registration/warp/treference_1_20160719_1_wm_01_m--nmie32dof36912c5ifov_warp_m--nmig160c5e1e-1x53r5.list: Aborted
File Failed

The average xform is generated, but no the average image.  also I tried (-o ./treference_2.nrrd instead of -o NRRD:./treference_2.nrrd), but still I get the same error. do you know what this error mean?
 
I am using the latest version of cmtk.
 
Thanks
 
Diego
Oct 21, 2016  05:10 PM | Greg Jefferis
Using avg_adm
Hi Diego,

It looks a lot as if you are running out of memory. How big are these images? How much RAM do you have? Are you following RAM usage? Does your OS limit RAM per process?

Best,

Greg.

Oct 21, 2016  08:10 PM | Diego Pacheco Pinedo - Harvard University
RE: Using avg_adm
I see, These are images of 452x500x320 pixels. I had a upper limit of 2GB, now I increased to 24GB and it is running (have not finished yet though).

Diego
Oct 22, 2016  03:10 PM | Diego Pacheco Pinedo - Harvard University
RE: Using avg_adm
Hi Greg
 
The extra memory fixed the problem.
 
Thanks!
 
Diego