# Center of mass from labelstats

**URL:** https://community.mrtrix.org/t/center-of-mass-from-labelstats/5956
**Category:** Uncategorized
**Created:** [August 18, 2022, 1:22pm UTC](https://community.mrtrix.org/t/center-of-mass-from-labelstats/5956 "2022-08-18T13:22:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![anjeehye](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@anjeehye](https://community.mrtrix.org/u/anjeehye)
#### Post date: [August 18, 2022, 1:22pm UTC](https://community.mrtrix.org/t/center-of-mass-from-labelstats/5956/1 "2022-08-18T13:22:19Z")

</div>

Hi!

I need to calculate the euclidean distance between the center of each ROI pair in our atlas as well as the mean length of streamlines between each ROI pair. For the former, I am using `labelstats` and for the latter, I’m using `tck2connectome` with `-scale_length -stat_edge mean`.

I calculated the euclidean distance based on the output from `labelstats`, and I’m seeing that the euclidean distances are way bigger (about 4x) than the mean streamline lengths! I think something went wrong with `labelstats` because I’m getting euclidean distances of ~200 and this doesn’t make sense given I’m using a rat brain.

Here are the commands I used:

```auto
tck2connectome 100m.tck atlas.mif connectome_distances.csv -tck_weights_in tck_weights.txt -scale_length -stat_edge mean -zero_diagonal -symmetric

labelstats -output centre atlas.mif

```

Any idea where it might have gone wrong? Thanks in advance!
