CoBrALab / quarantine

0 stars 0 forks source link

N4BiasFieldCorrection #2

Closed raihaan closed 9 years ago

raihaan commented 9 years ago

the command N4BiasFieldCorrection currently functions differently on scinet than it does locally.

On scinet (: N4BiasFieldCorrection -d 3 -b [200] -c [100x100x100x100,0.0000000001] -i $tmp/input.nii -o $tmp/output.nii

Locally: the script only functions without the "-d" option,

patrai@cicws25:/data/chamal/projects/raihaan/defaced$ N4BiasFieldCorrection -d 3 -b [200] -c [100x100x100x100,0.0000000001] -i test.nii -o n4test.nii Unsupported dimension

without -2, patrai@cicws25:/data/chamal/projects/raihaan/defaced$ N4BiasFieldCorrection 3 -b [200] -c [100x100x100x100,0.0000000001] -i test.nii -o n4test.nii Mask not read. Creating Otsu mask. Current level = 1 Iteration 1 (of 100). Current convergence value = 0.000867379 (threshold = 1e-10) ... .,.. running running

bit of googling suggests this may mean we have an old version of the N4BiasFieldCorrection script http://ehc.ac/p/advants/discussion/840261/thread/8145343e/

gdevenyi commented 9 years ago

What module do you load for N4BiasFieldCorrection

raihaan commented 9 years ago

minc-toolkit

gdevenyi commented 9 years ago

Perhaps this features is in minc-toolkit 1.9.2, this build is in progress.

raihaan commented 9 years ago

Ok, I will give it a test when that is complete

gdevenyi commented 9 years ago

What is your module configuration on scinet?

raihaan commented 9 years ago

Turns out I was running N4BiasFieldCorrection on scinet off of Matt's own custom ants bin as opposed to one of our modules. Requires further investigation as to where it exactly came from.

For now, those running N4 correction can either do so on scinet, or locally using minc-toolkit/1.0.01 N4BiasFieldCorrection 3 -b [200] -c [100x100x100x100,0.0000000001] -i input.nii -o output.nii

gdevenyi commented 9 years ago

Have you asked Matt where it came from?

gdevenyi commented 9 years ago

Have you figured out where the "different" version from Matt came from?

egarza commented 9 years ago

Hi guys, I actually got this error, so it's good to know.

I'm using Matt's version for the N4 correction because it works best, but I will give a try the other one you mention here.

Thanks

Ed

egarza commented 9 years ago

By the way, this is Matt's version in case you don't have it:

!/bin/bash

usage: register input.mnc output.mnc

input=$1 output=$2

tmp=/tmp/N4minc_$$ mkdir $tmp

mnc2nii -signed -short $input $tmp/input.nii N4BiasFieldCorrection -d 3 -b [200] -c [100x100x100x100,0.0000000001] -i $tmp/input.nii -o $tmp/output$ nii2mnc $tmp/output.nii $output

rm -r $tmp

gdevenyi commented 9 years ago

See minc-bpipe-toolkit for a implementation more similar to how the MNI runs N3.

I think I've figured out how to get bpipe working on scinet, implementation details as soon as I test it out.

egarza commented 9 years ago

Awesome, thanks.

bpipe is going to be sweet when it works.

gdevenyi commented 9 years ago

Well..it does work. Just not on scinet yet. :-) On Apr 29, 2015 10:59 PM, "Eduardo Garza" notifications@github.com wrote:

Awesome, thanks.

bpipe is going to be sweet when it works.

— Reply to this email directly or view it on GitHub https://github.com/CobraLab/quarantine/issues/2#issuecomment-97644498.

egarza commented 9 years ago

I'm sure we will all be swimming in bpipe soon

El Wednesday, April 29, 2015, Gabriel A. Devenyi notifications@github.com escribió:

Well..it does work. Just not on scinet yet. :-) On Apr 29, 2015 10:59 PM, "Eduardo Garza" <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Awesome, thanks.

bpipe is going to be sweet when it works.

— Reply to this email directly or view it on GitHub https://github.com/CobraLab/quarantine/issues/2#issuecomment-97644498.

— Reply to this email directly or view it on GitHub https://github.com/CobraLab/quarantine/issues/2#issuecomment-97659778.

Eduardo A. Garza Villarreal, M.D., Ph.D.