Dear Nate,
I was explaining why we took our original decision when
switching from Analyze to Analyze/Nifti. At this point it is
really quite embedded in how things work and in our libraries
so it would require a huge effort for us and so we are not going
to make these changes - sorry.
I would have thought that you only need to keep up one
wrapper script - something that took in the fsl command line
and then either determined the output type itself or had this
passed to it as one of the arguments: e.g.
fslstarterscript NIFTI_PAIR bet in.img out.img
fslstarterscript NIFTI_GZ bet in.img out.nii.gz
where fslstarterscript just did:
export FSLOUTPUTTYPE=$1
shift
$@
I wouldn't have thought that a three line script like this was
too difficult to maintain. If the researchers aren't using FSL
themselves, then I'm guessing that you are the only one
writing the fsl command lines, so this should also be reasonably
easy to keep consistent. I haven't used the LONI pipeline
myself, so maybe I'm underestimating how hard it is to get
everything to work.
Best of luck,
Mark
On 18 Sep 2009, at 01:02, Nate Vack wrote:
> On Thu, Sep 17, 2009 at 5:20 PM, Mark Jenkinson
> <[log in to unmask]> wrote:
>> Hi,
>
>> We've avoided doing this as older scripts often had Analyze
>> form hard-coded (.hdr and .img) which wasn't what was
>> desired.
>
> Wait... are you saying there are scripts that are like:
>
> export FSLOUTPUTTYPE=NIFTI
> bet in.img out.img
>
> that actually *expect* to produce out.nii? That's... odd... but, I can
> imagine why you might want to do that. And it's not problematic
> anyhow.
>
>> Also, the .hdr and .img extensions are not unique - as
>> they could refer to Analyze or to the two-file nifti format.
>
> I know -- but I can't use FSLOUTPUTTYPE to produce Analyze files, so
> this is kind of a moot point.
>
>> What I suggest you do is just encapsulate your calls with
>> either a script or just a temporary environment where
>> you reset the FSLOUTPUTTYPE variable to the desired type.
>
> Yeah, that's essentially what I'm doing now. Problem is, it's a lot of
> scripts to keep up (Pipeline doesn't allow one to set env variables,
> which is a whole other kettle of fish), and then our researchers
> aren't using fsl, they're using my jacked-up wrapper scripts, and when
> things break, that's one more place we've gotta look.
>
> To be clear, the behavior I'd love (especially the first example) is:
>
> #!/bin/bash
>
> unset FSLOUTPUTTYPE
>
> bet in.nii out.nii # Makes out.nii
> bet in.nii out # Complains it doesn't know an output type
>
> export FSLOUTPUTTYPE=NIFTI
>
> bet in.nii out # Makes out.nii
> bet in.nii out.img # Makes either out.nii or out.img, so long as all
> programs work the same
>
>
> I don't think the first example should interfere with legacy
> scripts...?
>
> Thanks!
> -Nate
>
|