Closed kmarvel54 closed 4 years ago
Hi Kate,
That's a really interesting finding. The function labelGeometryMeasures
directly uses the ITK program. How are the CAT12 volumes calculated?
Nick
Hi Nick,
Thank you for your feedback.
I am not sure how CAT12 volumes were calculated. It is not mentioned. Which approach should one use and why? Does it mean the volume calculations between different methods will differ? Please advise me. Thank you very much.
Kate
If methodology isn't mentioned, I would follow up with the neuromorphetrics people to see if you can find out. As I mentioned, the program we use is a direct interface with the ITK code and that code has been described and vetted for quite some time. Simply based on that information, I'd be more inclined to go with our volumes.
Thank you very much Nick.
Kate
It looks like the CAT12 volume is just the sum of the voxels multiplied by the volume of each voxel (0.15^3 cubic centimeters).
The ANTsX implementation will be different because we use the ITK implementation Nick links to above, which aims to measure the volume and surface area of the underlying object.
Separately to this, your voxel counts differ for your CAT12 and my_Voxels columns. I don't know why this is happening, but this is likely the cause of the largest discrepencies.
That's right Philip. The differences is caused by the voxel counts. I would go for ANTsR since it uses ITK which has been published. Thank you very much.
Kate
OK, but I would verify that you are getting the voxel counts correct, because that should not vary between implementations. There's no key in your repo to map the label names to the label intensities in the neuromorphometrics.nii
, but if you have that, you can also check the voxel counts using ITK-SNAP:
ITK-SNAP is also based on ITK so it should agree with ANTs on the voxel counts. The volume may differ because I don't think it uses the same framework as LabelGeometryMeasures.
Should show you the results agree with ITK (in cubic cm, not mm):
library(ANTsRCore)
#>
#> Attaching package: 'ANTsRCore'
#> The following objects are masked from 'package:stats':
#>
#> sd, var
#> The following objects are masked from 'package:base':
#>
#> all, any, apply, max, min, prod, range, sum
destfile = file.path(tempdir(), "neuromorphometrics.nii")
if (!file.exists(destfile)) {
dl = download.file(
"https://github.com/kmarvel54/Neuro/raw/master/neuromorphometrics.nii",
destfile = destfile
)
}
data = readr::read_csv(
"https://github.com/kmarvel54/Neuro/raw/master/Checking_cat12_volume_voxel_calculations.csv")
#> Parsed with column specification:
#> cols(
#> Label = col_character(),
#> CAT12_Voxel = col_double(),
#> CAT12_Volume = col_double(),
#> `my_Voxels)` = col_double(),
#> my_Volume = col_double()
#> )
neuromorphometrics_atlas <- antsImageRead(destfile)
tab = table(neuromorphometrics_atlas)
df = as.data.frame(tab)
vres = antsGetSpacing(neuromorphometrics_atlas)
vres = prod(vres)/ 1000
df$volume = df$Freq * vres
head(df)
#> neuromorphometrics_atlas Freq volume
#> 1 0 1520861 5132.905875
#> 2 1 152 0.513000
#> 3 2 111 0.374625
#> 4 3 285 0.961875
#> 5 4 303 1.022625
#> 6 5 151 0.509625
Created on 2020-02-24 by the reprex package (v0.3.0.9001)
Hi Philip,
Thank you very much for confirming the results using ITK-SNAP. I have added an updated version of the file, which contains the index for the region of interest. You first 12 ITK-SNAP results is in concondance with the ANTsR csv spreadsheet. See the csv file in
Checking_cat12_volume_voxel_calculations Version 2.
Thanks,
Kate
Absolutely correct. Thank you very much John.
thanks everyone - while this seems a relatively easy case, it's demonstrably not trivial to have a deeply validated framework like this ( ITK => ANTs/ITK-SNAP => ANTsX ) against which to compare other measurements. thanks to @kmarvel54 for asking for help/clarification on this. I think we've been under-selling this aspect of the framework for a long time.
+R
of course.
Thank you all for the great help and discussion. K
Hi ANTsR community,,
CAT12 uses atlas plus defining the regions in an additional csv file. I verified the neuromorphometrics (CAT12) csv file by calculating the geometry of the (Neuromorphometrics atlas), that is volume and voxel using ANTsR, is given below
ANTsR approach is in concordance to CAT12 look up table for only 30 ROIs in terms of the number of voxel and volume. They differ from CAT12 for about 112 regions. The spreadsheet is given in the link below: Checking_cat12_volume_voxel_calculations.
Why the difference in ROI volumes?
Thank you, Kate