demianw / tract_querier

Implementation of the White Matter Query Language and associated tools for dMRI white matter tract extraction and analysis
Other
27 stars 26 forks source link

Extracting coordinates of fiber termination... #22

Open lpetit opened 9 years ago

lpetit commented 9 years ago

Hi Demian,

I'm looking for a tool within the tract_querier formalism that may be able to give the coordinates of the fiber terminations. In the same vein, I would need to extract the coordinates of the intersection of the streamlines with an ROI. For example, I would like to count the streamlines crossing the inter-hemisphere callosal slice and get the coordinates of this intersection for each streamline to compute the center of gravity of a set of streamline crossing the CC...

Thanks a lot in advance for your help, Laurent

demianw commented 9 years ago

Hi @lpetit,

I added a tool that produces the endpoints in the last commit 7c1150c0dce248820f532fee526fe63ccd22aaa2

The next line is an example of how to do it

tract_math mytract.trk tract_dump_endpoints out.csv

will produce a CSV file with the format

tract #,x,y,z
0,-54.4067,-41.8707,-3.62924
0,-52.7601,13.0344,9.6041
1,-59.1612,-39.4632,-2.91676
1,-31.6892,9.5332,15.7185
2,-53.1927,-43.2231,-3.4072
2,-52.8408,13.2699,9.39157

In this dump the first column is the tract number, and then you have one row per endpoint. The coordinates are in RAS system.

As for the ROI intersection coordinates I might need more specifics. As what you ask for seems to be specific for sheet-like ROIs but I'm not sure what would you want in the case of a large blob-like ROI

lpetit commented 9 years ago

Hi Demian,,

Thanks for the information! For the ROI intersection, it is true that for now I would like to get the coordinates for a sheet-like-ROI. It may be a first approach and then we may see how to improve it for a blob-like ROI...?

Laurent PETIT

GROUPE D'IMAGERIE http://www.gin.cnrs.fr NEUROFONCTIONNELLE http://www.gin.cnrs.fr UMR5296 - CNRS - CEA - UNIV. BORDEAUX www.gin.cnrs.fr

see my publications here http://www.researchgate.net/profile/Laurent_Petit3/publications/?ev=prf_pubs_p1

Université de Bordeaux, PAC Carreire 146, rue Léo Saignat, CS 61292 33076 Bordeaux Cedex Mobile : +33 (0)671281912 E-mail : lpetit8@gmail.com

2015-04-08 9:48 GMT+02:00 Demian Wassermann notifications@github.com:

Hi Laurent,

I added a tool that produces the endpoints in the last commit 7c1150c https://github.com/demianw/tract_querier/commit/7c1150c0dce248820f532fee526fe63ccd22aaa2

The next line is an example of how to do it

tract_math mytract.trk tract_dump_endpoints out.csv

will produce a CSV file with the format

tract #,x,y,z 0,-54.4067,-41.8707,-3.62924 0,-52.7601,13.0344,9.6041 1,-59.1612,-39.4632,-2.91676 1,-31.6892,9.5332,15.7185 2,-53.1927,-43.2231,-3.4072 2,-52.8408,13.2699,9.39157

In this dump the first column is the tract number, and then you have one row per endpoint. The coordinates are in RAS system.

As for the ROI intersection coordinates I might need more specifics. As what you ask for seems to be specific for sheet-like ROIs but I'm not sure what would you want in the case of a large blob-like ROI

— Reply to this email directly or view it on GitHub https://github.com/demianw/tract_querier/issues/22#issuecomment-90833727 .