ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.21k stars 381 forks source link

BSplineSyn parameterization without integers results in parsing error #65

Closed satra closed 10 years ago

satra commented 10 years ago

this form of parameterization

antsRegistration ... --transform BSplineSyN[ 0.1, 26.0, 0.0, 3.0 ] ...

results in an error while this doesn't:

antsRegistration ... --transform BSplineSyN[ 0.1, 26, 0, 3 ] ...

also this error didn't happen on this version (bf3730d8a5614):

error:

Exception Object caught: 

itk::ExceptionObject (0x2efcee0)
Location: "unknown" 
File: /software/src/ANTs/Examples/../Utilities/antsCommandLineParser.h
Line: 121
Description: itk::ERROR: CommandLineParser(0x2eeaa70): ERROR: Parse error occured during command line argument processing
ERROR: Unable to convert 3.0       to type j
ntustison commented 10 years ago

The 4th parameter should be an unsigned int >= 1 so I'm not surprised that passing a float causes an error. Hans added quite a bit of error checking since the previous version which is probably why this error is being caught now.

satra commented 10 years ago

thanks nick

pinging @hjmjohnson

hey hans this is disrupting the bsplinesyn generator in nipype - i'm happy to fix it on nipype's side, but 26.0, 0.0 and 3.0 should in theory be castable to int without error :)

let me know what you prefer - we are going to release a patch in nipype soon, so i can include it.

satra commented 10 years ago

is there a place that lists the datatypes for each option?

ntustison commented 10 years ago

My brain but I recognize that that's not very useful. :)

satra commented 10 years ago

here come the brain machine interfaces! but for now i made this change:

https://github.com/nipy/nipype/pull/768

satra commented 10 years ago

it would be great to have this documented somewhere, but i'm closing this for now.

ntustison commented 10 years ago

Thanks Satra. I'll put it on my to-do list.

roelant001 commented 9 years ago

Dear @satra and @ntustison

I'm still encountering this issue. I've installed the most recent version from github. Am I doing something wrong or is this "bug" still persisting? When manually removing the .0's from the command and running it, it runs successfully. Any suggestions?

p.s. realized this issue is probably better discussed in the nipype community. So will cross post this there.

relevant settings:

reg.inputs.transforms = ['Translation','Rigid', 'Affine', 'SyN', 'BSplineSyN']
reg.inputs.transform_parameters = [(0.1,),(0.1,), (0.1,), (0.2, 3.0, 0.0),(0.25,25,0)]

Description: itk::ERROR: CommandLineParser(0x183c7b0): ERROR: Parse error occured during command line argument processing
ERROR: Unable to convert '25.0' to type 'j' as unsigned int