Open ajwood opened 8 years ago
I'm not against this but I'd suggest we tread carefully, or if we do implement this make it only accessible via an argument as opposed to default (in a way hidden) behaviour.
Reasoning:
Incidentally this is much the same problem as resampling a vector field.
My concern with the current implementation is that after a transform, the gradients directions in the header are simply incorrect.
mincresample -transformation nl.xfm -gradients local_gradients4D.mnc
). I think nonlinear transforms would need to scrub the global directions from the header, which could be implemented prior to the more complex problem of nonlinear reorienting.mincresample -transform
nonetheless needs to remove the misleading directions from the output file's header.A case for #1 would be distortion correction (from gradients).
On #3 realise that having information that is no longer valid/of use in the header is not unique to diffusion data.
Since diffusion gradients can be stored in the minc header in acquisition:direction_[xyz] and acquisition:bvalues, I was wondering if the core minc tools could be made to interpret them, where appropriate.
The first tools that come to mind are:
1) mincresample -transform lin.xfm Transform the directions along with the data
2) mincconcat -concat_dimension zspace slice1.mnc slice2.mnc slice3.mnc ... volume.mnc Refuse to concatenate slice that don't share a common direction and bvalue