Skip to content
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

PV6 Supine vs Prone does not change conversion #33

Open
gdevenyi opened this issue Dec 2, 2020 · 4 comments
Open

PV6 Supine vs Prone does not change conversion #33

gdevenyi opened this issue Dec 2, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@gdevenyi
Copy link
Collaborator

gdevenyi commented Dec 2, 2020

I have been collecting validation datasets for conversion and run into a conversion bug, which was handled properly in 0.3.4, and is wrong in HEAD.

I have a phantom brain in the scanner, physically in the orientation "Head First Prone". I have collected two scans, with PV6 configured as Quadruped, and one scan "Head First Prone" and another "Head First Supine".

brkraw info properly reports the difference in the data:

$ brkraw info 20200814_164540_CIC_PLANTEST_008_PV6_1_1/
Paravision 6.0.1
----------------
UserAccount:    foujer
Date:           2020-08-14
Researcher:     CIC_PLANTEST_008_PV6
Subject ID:     CIC_PLANTEST_008_PV6
Session ID:     CIC_PLANTEST_008_PV6
Study ID:       1
Date of Birth:  14 Aug 2020
Sex:            unknown
Weight:         0.001 kg
Subject Type:   Quadruped
Position:       Prone           Entry:  HeadFirst

[ScanID]        Sequence::Protocol::[Parameters]
[001]   Bruker:FLASH::1_Localizer_multi_slice::
        [ TR: 15 ms, TE: 3 ms, pixelBW: 212.30 Hz, FlipAngle: 10 degree]
    [01] dim: 2D, matrix_size: 192 x 192 x 15, fov_size: 25 x 25 (unit:mm)
         spatial_resol: 0.130 x 0.130 x 2.000 (unit:mm), temporal_resol: 129600.000 (unit:msec)
[002]   Bruker:FLASH::T1_FLASH_3D::
        [ TR: 10 ms, TE: 4 ms, pixelBW: 300.48 Hz, FlipAngle: 10 degree]
    [01] dim: 3D, matrix_size: 96 x 96 x 96, fov_size: 20 x 20 x 20 (unit:mm)
         spatial_resol: 0.208 x 0.208 x 0.208 (unit:mm), temporal_resol: 92160.000 (unit:msec)
$ brkraw info 20200814_170107_CIC_PLANTEST_008_PV6_1_2/
Paravision 6.0.1
----------------
UserAccount:    foujer
Date:           2020-08-14
Researcher:     CIC_PLANTEST_008_PV6
Subject ID:     CIC_PLANTEST_008_PV6
Session ID:     CIC_PLANTEST_008_PV6_HFS
Study ID:       2
Date of Birth:  14 Aug 2020
Sex:            unknown
Weight:         0.001 kg
Subject Type:   Quadruped
Position:       Supine          Entry:  HeadFirst

[ScanID]        Sequence::Protocol::[Parameters]
[001]   Bruker:FLASH::1_Localizer::
        [ TR: 100 ms, TE: 2.50 ms, pixelBW: 256.99 Hz, FlipAngle: 30 degree]
    [01] dim: 2D, matrix_size: 256 x 256 x 3, fov_size: 30 x 30 (unit:mm)
         spatial_resol: 0.117 x 0.117 x 2.000 (unit:mm), temporal_resol: 12800.000 (unit:msec)
[002]   Bruker:FLASH::T1_FLASH_3D::
        [ TR: 10 ms, TE: 4 ms, pixelBW: 300.48 Hz, FlipAngle: 10 degree]
    [01] dim: 3D, matrix_size: 96 x 96 x 96, fov_size: 20 x 20 x 20 (unit:mm)
         spatial_resol: 0.208 x 0.208 x 0.208 (unit:mm), temporal_resol: 92160.000 (unit:msec)
[003]   Bruker:FLASH::T1_FLASH_3D::
        [ TR: 10 ms, TE: 4 ms, pixelBW: 300.48 Hz, FlipAngle: 10 degree]
    [01] dim: 3D, matrix_size: 96 x 96 x 96, fov_size: 20 x 20 x 20 (unit:mm)
         spatial_resol: 0.208 x 0.208 x 0.208 (unit:mm), temporal_resol: 92160.000 (unit:msec)

However, after conversion, both the datasets are in the same orientation:
image

Left: correct orientation
Middle: incorrect orientation, should be rotated

The last commit to touch this code was: eaa6db0

In 0.3.4, it looks like subj_position is ignored for PV6 and applied to PV5, where as in master, it is applied unconditionally.

@gdevenyi
Copy link
Collaborator Author

gdevenyi commented Dec 2, 2020

It looks like perhaps the existing affine from bruker is actually correct and the additional corrections added were due to confusion regarding the exact orientation of previous phantom test data?

@gdevenyi
Copy link
Collaborator Author

gdevenyi commented Dec 2, 2020

Confirmed with PV5 as well, that just skipping the correction orientation by adding pass here:
https://github.com/BrkRaw/bruker/blob/master/brkraw/lib/orient.py#L24

Results in correct orientations for the Supine/Prone positions.

I will hold off on making any changes yet, as I want to collect all orientations and "subject types" in both PV5 and PV6 in a single session with the phantom universally in the "Head First Prone" position. I think perhaps we may be able to do away with most of this code.

@dvm-shlee
Copy link
Member

@gdevenyi Sorry for the delay regarding the update of this software. I tried to make the final orientation to be oriented on subject whether the animal positioned supine or prone. So if the resulted orientation is always the same. I think it is correct.

Please let me know if I mis-catch your point. Thanks!

@gdevenyi
Copy link
Collaborator Author

Sorry for the delay, please see email to your github listed email for a orientation dataset to sort this out.

@dvm-shlee dvm-shlee added the bug Something isn't working label Jul 1, 2023
@dvm-shlee dvm-shlee added this to the v0.4.0 release milestone Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants