frankyeh / DSI-Studio

A Tractography Tool for Diffusion MRI
http://dsi-studio.labsolver.org
Other
118 stars 54 forks source link

New update Questions #83

Closed arefks closed 8 months ago

arefks commented 8 months ago

Hello @frankyeh , we were wondering First question: why this change was made to the newer version?.

We have two scenarios with the same data and the same parameters:

Scenario 1: DSI studio Version 2022- tickbox of Check btable. The result looks good with logical fiber tracts: image

Scenario 2: DSI studio Version 2023- tickbox is missing. The result looks not good: image

But we were able to get good results by using the option Check b-table and Flip Bx. So Scenario 1 worked with only check btable, in scenario 2 we had to do both: check btable and flip Bx.

I think this change was made here (not sure though): https://github.com/frankyeh/DSI-Studio/commit/6c31a87d77c41304f5ce0f2deda92e1f465c9e59

Second Question would be, how to add flip Bx option in the command line as a flag or ...?

Third question would be that, what kind of btable does DSI studio use? (As far as I know, the header information of nii files doesn't store b-table information)

@lucaruthe @maswendt @fmahani1996

frankyeh commented 8 months ago

Hi Aref,

This is a critical issue, and thank you for raising it.

I do have a specific reason to make this change:

The older version always has check b-table as a checkbox and thus it

can only be executed when the user clicks on the reconstruction button. This is problematic because if the user rotates the image volume (e.g. align ac-pc) before checking the b-table, the checking function will fail and give a wrong flip in the b-table. Essentially, in the older version, there is no way a user can correct the b-table orientation before aligning the image volume to ac-pc or just rotate the image.

In the new version, the check b-table function is moved under the upper

menu [B-table][check b-table] as an individual step. This step will allow the b-table to be checked and flipped first before applying any rotation to the image volume (e.g. align ac-pc). DSI Studio will also prompt an error if the users try to check the b-table after DWI is rotated.

The last reason is that checking the b-table can take a lot of time,

and for most reconstruction conditions (e.g. human scans), checking the b-table is not needed. Having it as a default-enabled function will bring unnecessary computation costs.

The downside is that users will have to click on the check b-table

function or manually flip the b-table. This is particularly the case for animal scan users. However, considering that animal scan users are often more advanced in quality control, they have a lower risk of using a wrong b-table orientation without noticing than human scan users. Therefore, I made the final decision to make such a change.

 Hope this helps.

Best, Frank

On Tue, Oct 31, 2023 at 10:24 AM Aref Kalantari @.***> wrote:

Hello @frankyeh https://github.com/frankyeh , we were wondering First question: why this change was made to the newer version?.

We have two scenarios with the same data and the same parameters:

Scenario 1: DSI studio Version 2022- tickbox of Check btable. The result looks good with logical fiber tracts: [image: image] https://user-images.githubusercontent.com/87692940/279403359-6685e31c-c98c-4f82-a848-f8f4c42c28ee.png

Scenario 2: DSI studio Version 2023- tickbox is missing. The result looks not good: [image: image] https://user-images.githubusercontent.com/87692940/279403647-da225b95-26e6-4e14-87f4-91b0f7b304b6.png

But we were able to get good results by using the option Check b-table and Flip Bx. So Scenario 1 worked with only check btable, in scenario 2 we had to do both: check btable and flip Bx.

Second Question would be, how to add flip Bx option in the command line as a flag or ...? @lucaruthe https://github.com/lucaruthe @maswendt https://github.com/maswendt @fmahani1996 https://github.com/fmahani1996

Third question would be that, what kind of btable does DSI studio use? (As far as I know, the header information of nii files doesn't store b-table information) P.S.:

I think this change was made here (not sure though): 6c31a87 https://github.com/frankyeh/DSI-Studio/commit/6c31a87d77c41304f5ce0f2deda92e1f465c9e59

— Reply to this email directly, view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/83, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDI4J2JF7I3XXOHSZYKDTYCECZLAVCNFSM6AAAAAA6XZE5X6VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TANJZGA3TINA . You are receiving this because you were mentioned.Message ID: @.***>

frankyeh commented 8 months ago

So Scenario 1 worked with only check btable, in scenario 2 we had to do both: check btable and flip Bx.

Usually check b-table will also flip the table to the correct orientation. You may check the console output to make sure what flip/swap is done.

*Second Question would be, how to add flip Bx option in the command line as

a flag or ...?*

--cmd="[Step T2][B-table][flip bx]"

** Third question would be that, what kind of btable does DSI studio

use?** (As far as I know, the header information of nii files doesn't store b-table information)

DSI Studio will need bval/bvec with nifti.

P.S.:

I think this change was made here (not sure though): 6c31a87 https://github.com/frankyeh/DSI-Studio/commit/6c31a87d77c41304f5ce0f2deda92e1f465c9e59

— Reply to this email directly, view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/83, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDI4J2JF7I3XXOHSZYKDTYCECZLAVCNFSM6AAAAAA6XZE5X6VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TANJZGA3TINA . You are receiving this because you were mentioned.Message ID: @.***>

arefks commented 8 months ago

Dear @frankyeh, Thanks for the fast answer.

Another follow-up question on --cmd="[Step T2][B-table][flip bx], I want to implement it here: line 262 and line 270

So in summary we want to 1. add our own b-table and 2. add instruction on how to flip it

Kind regards Aref Kalantari

frankyeh commented 8 months ago

For replacing b-table, it will go with --action=src and supply bval and bvec.

For flipping b-table, it will go with --action=rec

The documentation on the DSI Studio website has the details. Frank

On Thu, Nov 2, 2023, 10:28 AM Aref Kalantari @.***> wrote:

Dear @frankyeh https://github.com/frankyeh, Thanks for the fast answer.

Another follow-up question on --cmd="[Step T2][B-table][flip bx], I want to implement it here: link https://github.com/Aswendt-Lab/AIDAmri/blob/ef96d9c2b0c05ecdc47f84437168eb9d29e62cf0/bin/3.2_DTIConnectivity/dsi_tools_20170214.py#L262C5-L262C13 and link2 https://github.com/Aswendt-Lab/AIDAmri/blob/ef96d9c2b0c05ecdc47f84437168eb9d29e62cf0/bin/3.2_DTIConnectivity/dsi_tools_20170214.py#L276

So in summary we want to 1. add our own b-table and 2. add instruction on how to flip it

Kind regards Aref Kalantari

— Reply to this email directly, view it on GitHub https://github.com/frankyeh/DSI-Studio/issues/83#issuecomment-1790843667, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDI4L6DEC4M327OEREXWLYCOU2DAVCNFSM6AAAAAA6XZE5X6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJQHA2DGNRWG4 . You are receiving this because you were mentioned.Message ID: @.***>