users > new commands for average_grey, average_edt
Showing 1-2 of 2 posts
Display:
Results per page:
Sep 9, 2013  08:09 PM | Keram Pfeiffer
new commands for average_grey, average_edt
Dear Torsten,

We have previously used an old version of CMTK (from 2007) and have now switched to CMTK 2.3.0.
The old scripts we used now throw us a couple of errors, because of binaries that are no longer part of the package.

Here are the code snippets, that cause the errors:

average_grey  --ignore-reference -v --cubic -o ${out_hdr} ${in_lists}

reformat --set-null 0 -i pvi -v -o ${out_hdr} --study1 ${flt_hdr} ${inlist}

average_edt -v --interpolate-image -n 3 -o pass4_lbls.hdr ./lbls/*.hdr

I assume reformatx would now do the job of reformat, with slightly changed syntax? What about average_grey and average_edt?


Thanks in advance.

Cheers,
Keram
Sep 9, 2013  09:09 PM | Torsten Rohlfing
RE: new commands for average_grey, average_edt
Hi Keram:

Here are the replacements for your command lines using the current tools:

1. to replace reformat:

reformatx --pad-out 0 --pv -o ${out_hdr} --floating ${flt_hdr} ${ref_hdr} ${inlist}

This needs an explicit, additional piece of information, i.e., the "reference image" (here assumed to be in variable "ref_hdr"). This is typically the image that you registered the floating image(s) to, for example this could be your atlas. The reason to require this on the command line now is that it allows you to use a difference target grid for reformatting than for registration, e.g., if you want to downsample or upsample relative to the image used as the registration reference.

2. to replace average_edt:

sba -n 3 -o pass4_lbls.hdr
./lbls/*.hdr


3. to replace average_grey:

There is, unfortunately, no drop-in replacement. Instead, the thought was to use a short script and the reformatx and average_images tools instead. That is, unfortunately, not quite as straight-forward.

I'll get back to you on this one.

Sorry for the inconvenience...

Torsten