Replies: 1 comment 1 reply
-
Ok, I found a solution, but I have another problem. The solution is to use a def crop_only_axially(array):
idx_bool = np.any(np.any(array>0, axis=-2), axis=-2)
return idx_bool.expand_as(array) it assumes that the input is in RAS coordinate system. The other problem I found is that Actually there is an open PR #3681 that already implemented the needed changes, but it still lacks of one check. It seems stuck from January, tough. Does anyone know if someone is still working on this ? Thanks ! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I mean if I want to crop a volume only along the superior-inferior direction by using
CropForeground
function. I don't want to crop also along R-L and A-P directions.I thought that setting
select_fn
arg tolambda x: np.all(x>0, axis=3)
would do the job, but an error is raisedBeta Was this translation helpful? Give feedback.
All reactions