daducci / COMMIT

Linear framework to combine tractography and tissue micro-structure estimation with diffusion MRI
Other
43 stars 33 forks source link

Tck_reader #59

Closed FrancescoGobbi closed 4 years ago

FrancescoGobbi commented 5 years ago

Adding features to read files containing estimates of axonal fibers in .tck format

daducci commented 5 years ago

@MarioOcampo , do you think it has something to do with the orientation of the different datasets?

fullbat commented 5 years ago

@FrancescoGobbi there are a couple of bug to fix in order to install this new version.

  1. Add import os to trk2dictionary.pyx
  2. correct with fclose( fpTractogram ) in line 221 of trk2dictionary_c.cpp
MarioOcampo commented 4 years ago

Yes, orientation and space in which they were saved

FrancescoGobbi commented 4 years ago

Ciao Mario! Ho visto solo ora. Oggi ho messo degli aggiornamenti sul codice, domani guardo gli errori che mi hai detto. Non riesco ad accedere a Slack! Penso di salire in mattinata, nel caso posso passare a chiederti un paio di cose? Gli errori che mi hai mandato forse sono dati dal fatto che non ho caricato tutto tutto quello che ho aggiunto, mi sembrava di si, ma invece è un no.

Grazie. Notte! Francesco

Il giorno gio 24 ott 2019 alle ore 20:02 Mario Ocampo < notifications@github.com> ha scritto:

@MarioOcampo requested changes on this pull request.

There are some errors in the code that do not allow to install it

In commit/trk2dictionary/trk2dictionary.pyx https://github.com/daducci/COMMIT/pull/59#discussion_r338708508:

@@ -15,7 +16,7 @@ cdef extern from "trk2dictionary_c.cpp": char filename_tractogram, int data_offset, int Nx, int Ny, int Nz, float Px, float Py, float Pz, int n_count, int n_scalars, int n_properties, float fiber_shiftX, float fiber_shiftY, float fiber_shiftZ, int points_to_skip, float min_seg_len, float ptrPEAKS, int Np, float vf_THR, int ECix, int ECiy, int ECiz, float _ptrMASK, float ptrTDI, char path_out, int c, double ptrAFFINE,

  • int nBlurRadii, double blurSigma, double ptrBlurRadii, int ptrBlurSamples, double* ptrBlurWeights
  • int nBlurRadii, double blurSigma, double ptrBlurRadii, int ptrBlurSamples, double ptrBlurWeights, float ptrArrayInvM

The interface doesn't match with the header of the function (in file trk2dictionary_c.cpp) and the call to the function (this file line 324)

In commit/trk2dictionary/trk2dictionary.pyx https://github.com/daducci/COMMIT/pull/59#discussion_r338711189:

@@ -114,6 +115,8 @@ cpdef run( filename_tractogram, path_out, TCK_ref_image = None, filename_peaks = int ptrBlurSamples double ptrBlurWeights int nBlurRadii

  • float [:] ArrayInvM

Are these variables part of blur params? If not, they should be in a separate block

In commit/trk2dictionary/trk2dictionary.pyx https://github.com/daducci/COMMIT/pull/59#discussion_r338711925:

@@ -190,13 +193,23 @@ cpdef run( filename_tractogram, path_out, TCK_ref_image = None, filename_peaks =

 if (extension == ".tck"):
     #open file .nii and get header of this to get info on the structure
  • int peaks = 0
  • int mask = 0

It isn't the right place to declare variables

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/daducci/COMMIT/pull/59?email_source=notifications&email_token=AKOM27ZGDMP2VHFBLODOU33QQHPMJA5CNFSM4GKRZGZ2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCJELKYQ#pullrequestreview-306754914, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKOM272LTQ5LIDKZIDNP2YLQQHPMJANCNFSM4GKRZGZQ .