Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ANTsX/ANTsRNet
Browse files Browse the repository at this point in the history
ntustison committed Apr 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents ac11207 + edadeef commit 90213a8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/desikanKillianyTourvilleLabeling.R
Original file line number Diff line number Diff line change
@@ -239,7 +239,7 @@ desikanKillianyTourvilleLabeling <- function( t1, doPreprocessing = TRUE,
################################

t1Preprocessed <- t1
if( doPreprocessing == TRUE )
if( doPreprocessing )
{
t1Preprocessing <- preprocessBrainImage( t1,
truncateIntensity = c( 0.01, 0.99 ),
@@ -322,7 +322,7 @@ desikanKillianyTourvilleLabeling <- function( t1, doPreprocessing = TRUE,
for( i in seq.int( length( probabilityImagesList[[1]] ) ) )
{
resampledImage <- resampleImage( probabilityImagesList[[1]][[i]], dim( t1Preprocessed ), useVoxels = TRUE, interpType = 0 )
if( doPreprocessing == TRUE )
if( doPreprocessing )
{
outerProbabilityImages[[i]] <- antsApplyTransforms( fixed = t1, moving = resampledImage,
transformlist = t1Preprocessing$templateTransforms$invtransforms,
@@ -395,7 +395,7 @@ desikanKillianyTourvilleLabeling <- function( t1, doPreprocessing = TRUE,
} else {
decroppedImage <- decropImage( probabilityImagesList[[1]][[i]], t1Preprocessed * 0 + 1 )
}
if( doPreprocessing == TRUE )
if( doPreprocessing )
{
innerProbabilityImages[[i]] <- antsApplyTransforms( fixed = t1, moving = decroppedImage,
transformlist = t1Preprocessing$templateTransforms$invtransforms,
@@ -470,7 +470,7 @@ desikanKillianyTourvilleLabeling <- function( t1, doPreprocessing = TRUE,
sixTissue <- deepAtropos( t1Preprocessed, doPreprocessing = FALSE,
antsxnetCacheDirectory = antsxnetCacheDirectory, verbose = verbose )
atroposSeg <- sixTissue$segmentationImage
if( doPreprocessing == TRUE )
if( doPreprocessing )
{
atroposSeg <- antsApplyTransforms( fixed = t1, moving = atroposSeg,
transformlist = t1Preprocessing$templateTransforms$invtransforms,
@@ -518,7 +518,7 @@ desikanKillianyTourvilleLabeling <- function( t1, doPreprocessing = TRUE,
}
}

if( returnProbabilityImages == TRUE && doLobarParcellation == TRUE )
if( returnProbabilityImages && doLobarParcellation )
{
return( list(
segmentationImage = dktLabelImage,
@@ -527,14 +527,14 @@ desikanKillianyTourvilleLabeling <- function( t1, doPreprocessing = TRUE,
outerProbabilityImages = outerProbabilityImages
)
)
} else if( returnProbabilityImages == TRUE && doLobarParcellation == FALSE ) {
} else if( returnProbabilityImages && ! doLobarParcellation ) {
return( list(
segmentationImage = dktLabelImage,
innerProbabilityImages = innerProbabilityImages,
outerProbabilityImages = outerProbabilityImages
)
)
} else if( returnProbabilityImages == FALSE && doLobarParcellation == TRUE ) {
} else if( ! returnProbabilityImages && doLobarParcellation ) {
return( list(
segmentationImage = dktLabelImage,
lobarParcellation = lobarParcellation

0 comments on commit 90213a8

Please sign in to comment.