Closed ylep closed 2 years ago
When using AimsApplyTransform this way, we end up with a graph containing an empty bounding box:
boundingbox_max
boundingbox_min
whereas on the input graph (before AimsApplyTransform) I have for instance:
boundingbox_max 255 255 123
boundingbox_min 0 0 0
this is probably the cause of the problem. However I agree anatomist should not crash. I'll try to fix that.
In aims, the function transformGraph()
builds a new bounding box, only if graph objects contain buckets. If the graph contains only volumes, meshes, or is empty, then the resulting bounding box is left empty.
I'm fixing that by applying the transformation to the bbox, if it is affine, or leaving the initial one if nothing else works.
AimsApplyTransform
generates buggy output with Graphs that contain VolumesTo Reproduce Steps to reproduce the behavior:
AimsGraphConvert label_volume.nii good_graph.nii
AimsApplyTransform good_graph.arg bad_graph.arg
(even with the default identity transformation the problem still occurs)bad_graph.arg
in AnatomistExpected behavior The output Graph should be well-formed, and equivalent to the input Graph.
Environment: