-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
warning to truncate affine #6819
base: dev
Are you sure you want to change the base?
warning to truncate affine #6819
Conversation
Signed-off-by: a-parida12 <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: a-parida12 <[email protected]>
Signed-off-by: a-parida12 <[email protected]>
/black |
Signed-off-by: monai-bot <[email protected]>
/build |
I will have limited time for the next 2 weeks to give it a test-through to reproduce. |
@@ -499,6 +499,13 @@ def __call__( | |||
warnings.warn("`data_array` is not of type MetaTensor, assuming affine to be identity.") | |||
# default to identity | |||
input_affine = np.eye(sr + 1, dtype=np.float64) | |||
input_affine_shape = input_affine.shape[0] | |||
if input_affine_shape != sr + 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel we can compare the length of self.pixdim
and sr+1
; otherwise, there might always be a WARNING for 2D data. Also, users may not modify the affine_matrix
, perhaps we should just mention it in the warning message for users who are unfamiliar with MONAI and don't know they need to add a channel.
What do you think?
Hi @a-parida12, is there any more progress on this PR so far, do you plan to finish this one? |
Fixes #6809 .
Description
A few sentences describing the changes proposed in this pull request.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.