Skip to content

Instantly share code, notes, and snippets.

@stowler
Created April 16, 2013 20:14
Show Gist options
  • Save stowler/5399226 to your computer and use it in GitHub Desktop.
Save stowler/5399226 to your computer and use it in GitHub Desktop.
mm->vox integers per FSL fslmeants OUTPUT
FSL fslmeants OUTPUT
------------------------------------------------
If user requests voxel coordinate output (not mm) via fslmeants --showall,
fslmeants doesn't appear to convert floats to integers. It just matrix
transforms internal voxel coordinates (which already lack decimal values due to
their row/slice/column nature) to nifti voxel coordinates.
From fslmeants.cc:
311 if (showall.value()) {
312 ColumnVector v(4);
313 v << x << y << z << 1.0;
314 v = (vin[0].niftivox2newimagevox_mat()).i() * v;
315 meants(1,num) = v(1);
316 meants(2,num) = v(2);
317 meants(3,num) = v(3);
318 meants.SubMatrix(4,nt,num,num) = vin.voxelts(x,y,z);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment