daducci / AMICO

Accelerated Microstructure Imaging via Convex Optimization (AMICO) from diffusion MRI data
Other
102 stars 62 forks source link

errors in ICVF and OD maps for NODDI data #87

Closed andebag closed 5 years ago

andebag commented 5 years ago

Hello, My amico program is seeming to report strange final results when processing my NODDI DTI data. Initially, before processing, I had the same issue here:

https://github.com/daducci/AMICO/issues/61

where normalizing my bvectors and making my orientations were correct was conducted through the same way the answers in that link stipulate, and the program runs smoothly. However, it seems that much of the ICVF produced using ae.fit() are maxed out. The OD maps aren't maxed out, but do seem to have some errors. The ISOVF map seems fine to me. The raw data I used is fine as well.

I am not sure if there is an issue with my bvecs/bvals/scheme files that is causing an error? Or if the directions used in the scan acquisition are not organized correctly but from my perspective everything seems to be there. I have attached a drive link with the in vivo data I have talked about and the final output that amico produced:

https://drive.google.com/file/d/10FSF-s0v5jPUKoQElxVPF1erTvenwsoI/view?usp=sharing

The norm_bvec file was used to generate the scheme file. I can provide any additional info. Any help would be greatly appreciated!

Thanks, Ande

daducci commented 5 years ago

Hi @andebag ,

I had a quick look at your data. First of all, did you try fitting the NODDI model with the original algorithm of Gary Zhang (https://www.nitrc.org/projects/noddi_toolbox)? To save time, just try it on one slice and check if you get similar results.

Also, your data has a lot of artifacts, e.g., a lot of motion. I am not sure if this could explain the wrong fit, but I'd first give it a shot with the original algorithm. Let me know!

andebag commented 5 years ago

@daducci Sorry for the late reply! I only test ran the matlab toolbox with their sample data, but tried AMICO shortly after & got the same results, so I never tested it out on my data because the AMICO method ran without errors, for both the example and my data - that was shortsighted of me as now I can see I'm getting some major errors when trying to set the protocol (bval & bvec datasets) in matlab. I'm not sure why I wouldn't have an issue with AMICO after my initial troubleshooting but I'll try to do some troubleshooting in matlab & let you know if I can produce anything that's similar to what I got before.

And yes, susceptibility (working at 21 T) and motion are a bit problematic - I am going to try to acquire some new data in the coming weeks to use the eddy susceptibility & motion correction with FSL - I am missing some data for accurately getting these fixed by their algorithm. Aside from that, I'll let you know how the matlab output looks once I'm able to resolve the scheme file setup issue!

daducci commented 5 years ago

Perfect! I look forward to receiving updates from you.

andebag commented 5 years ago

Hi @daducci ,

The outputs from both the matlab toolbox and AMICO are very similar, though the matlab output of ODI seems to be a bit more uniform. Still trying to sort out motion/susceptibility correction with FSL, it's being a bit stubborn with accepting my data right now so that may be a bit. In the meantime, I may run some _ex _vivo__ data soon to see if that looks reasonable so I won't have exorbitant motion and susceptibility . What do I need to change in the AMICO code to do this?

daducci commented 5 years ago

So it's not an issue with the approximation made in AMICO, but rather something with the model itself. For the ex vivo data, in principle, you just need to adapt the diffusivity (both in the original implementation as well as in AMICO)

andebag commented 5 years ago

@daducci thanks for the recommendation. I have performed NODDI analysis on a previously acquired set of DWI of ex vivo naive mouse brain. I changed the diffusivity (Din (or dPar in the code) and dIso) throughout the code based on literature I've read for ex vivo DTI. There were a few things that were strange.

(1) The OD maps looks really good, but the ICVF are maxed out at 1 about everywhere, and the opposite trend with the ICVF maps.

and

(2) The exact same results were produced when I reverted back to the original AMICO code. This was pretty confusing to me and I don't think I missed anything, so let me show you the exact parts I edited in the models.py file by each section of the code, with comments now including what the initial values were:

class StickZeppelinBall( BaseModel ) : line 193 self.d_par = 0.9E-3 # Parallel diffusivity [mm^2/s] -> Originally 1.7E-3 line 195 self.d_ISOs = np.array([ 2.0E-3 ]) # Isotropic diffusivitie(s) [mm^2/s] Originally 3.0E-3

class CylinderZeppelinBall( BaseModel ) : line 306 self.d_par = 0.9E-3 # Parallel diffusivity [mm^2/s] Originally 0.6E-3 line 310 self.isExvivo = True # Add dot compartment to dictionary (exvivo data) ->Originally "False"

class NODDI( BaseModel ) : line 480 self.dPar = 0.9E-3 #is originally 1.7E-3 line 481 self.dIso = 2.0E-3 #is originally 3.0E-3 line 484 self.isExvivo = True #is originally False

class FreeWater( BaseModel ) : line 1035 self.type = 'Mouse' #originally set to Human line 1044 self.d_par = 0.9E-3 #originally 1.0E-3 line 1046 self.d_isos = [2.0E-3] #originally [1.5E-3, 3e-3]

class VolumeFractions( BaseModel ) : line 1194 self.hasISO = True # Simulate free water compartment? Originally False

I didn't change of the diffusivities in the else statements in theses sections since I specified the mouse model and that "isExvivo = True". But even if some of what I had changed was incorrect, I would've expected slightly different outputs from processing based on changing the code. I should also note that this previous data is low shell (B = 1000 & 2000 with 21 directions/shell), but for this trial run of processing I think it'd be ok as a first step and to improve later. What do you think? Did I change more than necessary or what should remain the same in the code?

I've attached a copy of the data I used and the processing outputs. NODDI_processing.zip

andebag commented 5 years ago

@daducci Please disregard the previous comment! AMICO wasn't truly rewriting the program for the ex vivo protocol - I fixed it! It looks great now!

daducci commented 5 years ago

What do you mean? And, do you get similar results with the original NODDI method?

andebag commented 5 years ago

When I was switching to ex vivo, it wasn't actually inputting that change into AMICO, it was a mistype on my part that is now working thankfully. And yes the results appear to be similar. Hopefully I can now sort out the in vivo issues soon!

daducci commented 5 years ago

My suggestion is to first make sure your results look reasonable in the original NODDI model, for instance in a single slice. Then, you can tune the parameters in AMICO and perform all your analyses on the remaining slices/subjects. Let me know if you need help! Best, Ale