Description Usage Arguments Details Value Author(s) Examples
View source: R/getTemplateCoordinates.R
This function will provide a mapping that labels an input image and its blobs.
1 2 3 4 5 6 7 | getTemplateCoordinates(
imagePairToBeLabeled,
templatePairWithLabels,
labelnames = NULL,
outprefix = NA,
convertToTal = FALSE
)
|
imagePairToBeLabeled |
e.g. the template image and the activation map |
templatePairWithLabels |
e..g the mni image and brodmann label set |
labelnames |
a list of names for the labels |
outprefix |
if output to a file, provide file prefix |
convertToTal |
bool, return talairach coordinates |
Uses Matthew Brett's mni2tal to get the final Talairach coordinates from MNI space.
This is a standard approach but it's not very accurate.
The output point is in approximate template space.
Avants, BB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## Not run:
#
# ch2bet is available in chris rorden's mricron
# but you can do something with any other image
# e.g. a statistical image
#
tem<-antsImageRead(getANTsRData("ch2"),3)
clust <- antsImageClone( tem )
atem = as.array(tem)
clust[ atem < 80 ]<- 0
clust[ atem > 90 ]<- 0
clust[ atem > 80 & atem < 90 ]<- 1
clust<-iMath(clust,"ME",1) # erosion
clust <- labelClusters( clust , minClusterSize=30, minThresh=1, maxThresh=1)
if ( ! exists("mymni") ) {
# try getANTsRData if you have www access
mymni<-list( antsImageRead(getANTsRData("mni"),3),
antsImageRead(getANTsRData("mnib"),3),
antsImageRead(getANTsRData("mnia"),3) )
}
template_cluster_pair<-list(tem,clust)
gcoords<-getTemplateCoordinates( template_cluster_pair ,
mymni , convertToTal = TRUE )
# output will be like
# > gcoords$templatepoints
# x y z t label Brodmann AAL
# 1 -12 13 -3 0 1 0 Caudate_R
# 2 13 16 5 0 2 0 Caudate_L
#
# can also use a white matter label set ...
#
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.