From 251f6f1b2f3c0ab357cd1588ecbd4cf6d0c72fff Mon Sep 17 00:00:00 2001 From: Nick Tustison Date: Mon, 12 Aug 2024 17:41:52 -0700 Subject: [PATCH] BUG: reorient template geometry. --- R/whiteMatterHyperintensitySegmentation.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/whiteMatterHyperintensitySegmentation.R b/R/whiteMatterHyperintensitySegmentation.R index 1270f00..8e4b56d 100644 --- a/R/whiteMatterHyperintensitySegmentation.R +++ b/R/whiteMatterHyperintensitySegmentation.R @@ -776,9 +776,9 @@ shivaPvsSegmentation <- function( t1, flair = NULL, batchY <- batchY / length( modelIds ) } - pvs <- as.antsImage( drop( batchY ), origin = antsGetOrigin( t1 ), - spacing = antsGetSpacing( t1 ), - direction = antsGetDirection( t1 ) ) + pvs <- as.antsImage( drop( batchY ), origin = antsGetOrigin( reorientTemplate ), + spacing = antsGetSpacing( reorientTemplate ), + direction = antsGetDirection( reorientTemplate ) ) pvs <- applyAntsrTransformToImage( invertAntsrTransform( xfrm ), pvs, t1 ) return( pvs ) } \ No newline at end of file