-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Labels
backwards compatiblebugeffort:mediumEstimated medium effort taskEstimated medium effort taskimpact:highEstimated high impact taskEstimated high impact taskreports
Milestone
Description
This problem has been around for a long while. When the intersection of the mask with the visualization plane only contains a fraction of a voxel, nilearn plotting gets very confused:
With nipreps/fmriprep#2130 the problem is exacerbated (not so much for fully sampled datasets, but definitely for our test data).
I believe this problem would completely be fixed if we replaced the affine information of the input images to be aligned with the cardinal axes. To do so, I'd propose:
nibabel.as_closest_canonicalto all volumetric inputs of plots.- Generate a new affine with: image_zooms x identity
- Perhaps re-center the volume for visualization purposes (so reported coordinates are w.r.t. the center of the volume).
This way, visualization will cut through full voxels always and the marching cubes algorithm will not go bananas.
In general, this approach would also make our reports more transparent because:
- We would be able to safely drop interpolations by nilearn
- The user will have access to the visualization of the naked data array, instead of a reoriented version.
Opinions?
Metadata
Metadata
Assignees
Labels
backwards compatiblebugeffort:mediumEstimated medium effort taskEstimated medium effort taskimpact:highEstimated high impact taskEstimated high impact taskreports