Skip to content

Conversation

@Nic-Ma
Copy link
Contributor

@Nic-Ma Nic-Ma commented Feb 6, 2020

Hi All,

This PR implemented the tool API to write model output data into Nifti format image #39 .
We can call it when evaluation and validation examples are ready.
Could you please help review it?
Thanks.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 6, 2020

Hi @IsaacYangSLA ,

I found 2 CI issues in this PR:

  1. I can't open the ci/gitlab/gitlab.com web page for details, always loading.
    When I changed from Shanghai VPN to HongKong VPN, page opened. Seems like IT firewall issue...
  2. @wyli told me that this error is related to installation failure of PyTorch 1.4, seems not related to PR?

Could you please help take a look?
Thanks.

affine = np.eye(4)

if revert_canonical:
codes = nib.orientations.axcodes2ornt(nib.orientations.aff2axcodes(np.linalg.inv(affine)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does np.linalg.inv(affine) actually give up the orientation we expect of the original? If the original's axis codes were LAS they would become RAS when converted to canonical, but doesn't this line turn RAS into LPI?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wyli ,

As you are expert at Nifti format, could you please help take a look at @ericspod 's question?
Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericspod #74 fixes the canonical reversion logic. We need to store the original affine matrix, use it to get orientation and apply the orientation to revert data.

@wyli wyli mentioned this pull request Feb 6, 2020
5 tasks
@Nic-Ma Nic-Ma changed the title 39-nifti-writer 39 nifti writer Feb 7, 2020
@wyli
Copy link
Contributor

wyli commented Feb 7, 2020

all commits from this PR are merged into #56 please review #56 instead

@wyli wyli closed this Feb 7, 2020
@wyli wyli deleted the 39-nifti-writer branch May 21, 2020 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants