Open reckbo opened 7 years ago
ConvertBetweenFileFormats attempts to maintain the input images direction cosines as closely as possible.
DWIConvert tries to match the FSL standards. Due to the fact that the BVEC and BVAL information is implicitly in an LAS corrdinate system (and the fact that the measurement frame is implicitly an identity matrix), we needed to re-organize some data sets to ensure that a consistent representation from the DWI data was maintained.
Great, thanks.
Due to the fact that the BVEC and BVAL information is implicitly in an LAS corrdinate system (and the fact that the measurement frame is implicitly an identity matrix
@hjmjohnson I'd like to re-open this to discuss the current behavior for FSL Nifti -> NRRD
1) measurement frame
= identity
behavior for DWIConvert output when converting
2) writing FSL bvec file with g[i] = inv(MF) * g_orig[i]
For (1):
inv(measurement frame)
(but see (2) below)measurement frame
to identity (without any change to the bvec values)For (2):
What is the reason for using inv(measurement frame)
? Considering that the bvec is expressed with respect to the image axes, shouldn't the transform that takes the vector from image axes to world space be just measurement frame
, not inv(mf)
? As a concrete example, here is a comparison of two tensor maps computed with FDT, using output from dcm2niix [1] and DWIConvert [2].
[1]
[2]
In addition to the links provided by @ihnorton, I would suggest this link. Fortunately, DWI data is is virtually always acquired axially, but if you do encounter coronal or sagittal acquisitions, I would be very cautious of hard coding the LAS reorientation, as Eddy assumes that slices are the 3rd dimension and altering this will impact options like --repol
and --slspec
.
Description
Given an LPS DWI nrrd, DWIConvert makes an LAS nifti, and given a single diffusion volume of that nrrd, ConvertBetweenFileFormats makes an LPS nifti. This has consequences when converting back to nrrd, namely the
j
inijk
space is flipped in the first case, but remains unchanged and matches the original in the latter case. (The world coordinates are fine and correct).Issue
Here's an example of where this affected me:
Usually I mask a nrrd using
unu 3op ifelse
but that does so in ijk space, so 1 does not work, but 2 is fine. So my questions are:Reproduce
git clone https://github.com/pnlbwh/BRAINSTools-debug cd BRAINSTools-debug && make