gpilab / core-nodes

The core nodes are a collection of basic data manipulation and visualization algorithms.
http://docs.gpilab.com/en/develop/NodeDev/devguide.html
BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link

lab/raw/sin data correction in GPI #12

Closed simin1013 closed 5 years ago

simin1013 commented 5 years ago

Hello, I'm a new user to GPI. I wonder if the latest release of ReadPhilips node (Jul 7, 2017) lacks some data correction steps compared to release 4 (Jan 14, 2016), for the lab/raw/sin data? I get EPI images with undesired aliasing-like image artifacts from the latest release. In contrary, release 4 works well. Will be there a new release with full data correction, as well as handling multiple diffusion directions for EPI-DTI? All the releases on GitHub can only read 1 diffusion direction.

Thank you! Best regards, Simin

aganders3 commented 5 years ago

@rkrobison can you shed some light on any changes to this node and potential enhancements? Packaging of that node is also still an issue for now and I don't know if we have a plan to fix it.

rkrobison commented 5 years ago

Hi @aganders3 and @simin1013 . I don't have any hope of perfectly solving the data corrections issue without more direct help from a Philips recon person. It may be that a more recent version of ReadPhilips could solve the data correction issues you are having. While I recently released a version of the ReadPhilips python code that handles multiple diffusion directions for raw/lab/sin data, this feature isn't available in the current packaged versions. However, the packaged versions can correctly read DTI data from data/list format data. The only setup I currently have for building a new packaged version is for MACOS and Python v3.6. @aganders3, do you a way to build other packaged versions? For users with direct access to the ReadPhilips code, it is easier for me to troubleshoot issues they are facing. It seems to me that we should have a mechanism for Philips users to request access to the ReadPhilips code via their clinical scientist...

aganders3 commented 5 years ago

I think your build script is a good start but we need a matrix of Python and NumPy versions to build with. Then we need to also run it in Linux. I don’t think there’s a free way to automate this since it’s not open source.

simin1013 commented 5 years ago

@rkrobison @aganders3 Many thanks for your reply. I already know that you've solve the problem of handling multiple diffusion directions for lab/raw/sin data, as I'm just the one who got in touch with Dr. Melvyn Ooi in Philips for this issue. I've got access to the ReadPhilips python code from him thereafter. As for data correction, the release 4 I mentioned (https://github.com/gpilab/philips-data-reader/releases/tag/4, released by @nckz ) can provide the desired images. Please refer to the attached slide. So I wonder if it's possible for you to merge the data correction related code in release 4 into your latest version?

Best regards, Simin GPI_ReadPhilips_node-data_correction.pptx

rkrobison commented 5 years ago

Hi @simin1013 .

There were some quite substantial changes made to the code structure of the data corrections between those versions, that would make it unrealistic to try to merge the corrections from release 4 into the current version. If you could share an example data set with me, I could try to debug the issue in the current version.

Best regards, Ryan

simin1013 commented 5 years ago

Dear Ryan @rkrobison Thanks for your reply. Sorry for the late response. It seems that the problem is not easy to handle. I've uploaded an example data, which you may find from the following google drive link. For more details about the data, please refer to a README file in it. https://drive.google.com/file/d/1hq488WgDvQS9HhsWDtUZZDtX9qJKfHzJ/view?usp=sharing It occurs to me that, if it's easier to solve the DTI dimension problem based on the release 4 code, it's also fine. Hoping that this debugging won't bother you much. Many thanks for your kindness!

Best regards, Simin

rkrobison commented 5 years ago

Hi @simin1013 .

I finally had the chance to look into the issues you are having with ReadPhilips with your DTI data. You may have already figured this out, but I believe I discovered a bug in the current code that is causing the issue.

You should be able to fix it in the current version of readPhilipsExports.py by replacing the following line in the basicCorrections function

data = data[:, ::-1] * fear_corr * corr_factor

with

data[:, :] = data[:, ::-1] * fear_corr * corr_factor

Please let me know if that solves the issue, or if you already found a solution.

Best regards, Ryan

simin1013 commented 5 years ago

Dear @rkrobison,

Sorry for the late response. Your solution just perfectly solves the issue when I tested on my data. I didn't get a solution by myself previously.

Thank you so much for your help!

Best regards, Simin