Skip to content

Commit

Permalink
Merge pull request #1739 from ANTsX/MoreThan10A
Browse files Browse the repository at this point in the history
ENH: More than 10 modalities.
  • Loading branch information
ntustison committed May 3, 2024
2 parents 4cbfbf2 + 1956e7e commit b1a0233
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Scripts/antsMultivariateTemplateConstruction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function shapeupdatetotemplate() {
echo " shapeupdatetotemplate---voxel-wise averaging of the warped images to the current template"
echo "--------------------------------------------------------------------------------------"

imagelist=(`ls ${outputname}template${whichtemplate}*WarpedToTemplate.nii.gz`)
imagelist=(`ls ${outputname}template-modality${whichtemplate}-*WarpedToTemplate.nii.gz`)
if [[ ${#imagelist[@]} -ne ${IMAGESPERMODALITY} ]]
then
echo "ERROR shapeupdatedtotemplate - imagelist length is ${#imagelist[@]}, expected ${IMAGESPERMODALITY}"
Expand Down Expand Up @@ -1346,7 +1346,7 @@ while [[ $i -lt ${ITERATIONLIMIT} ]];
indir=`pwd`
fi
IMGbase=`basename ${IMAGESETARRAY[$l]}`
POO=${OUTPUTNAME}template${k}${IMGbase}
POO=${OUTPUTNAME}template-modality${k}-${IMGbase}
OUTFN=${POO%.*.*}
OUTFN=`basename ${OUTFN}`
OUTFN="${OUTFN}${l}"
Expand Down
4 changes: 2 additions & 2 deletions Scripts/antsMultivariateTemplateConstruction2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ function shapeupdatetotemplate() {
#echo " ImageSetStatistics $dim ${whichtemplate}WarpedToTemplateList.txt ${template} 0"
echo "--------------------------------------------------------------------------------------"

imagelist=(`ls ${outputname}template${whichtemplate}*WarpedToTemplate.nii.gz`)
imagelist=(`ls ${outputname}template-modality${whichtemplate}-*WarpedToTemplate.nii.gz`)
if [[ ${#imagelist[@]} -ne ${IMAGESPERMODALITY} ]]
then
echo "ERROR shapeupdatedtotemplate - imagelist length is ${#imagelist[@]}, expected ${IMAGESPERMODALITY}"
Expand Down Expand Up @@ -1469,7 +1469,7 @@ while [[ $i -lt ${ITERATIONLIMIT} ]];
indir=`pwd`
fi
IMGbase=`basename ${IMAGESETARRAY[$l]}`
OUTFN=${OUTPUTNAME}template${k}${IMGbase/%?(.nii.gz|.nii)}
OUTFN=${OUTPUTNAME}template-modality${k}-${IMGbase/%?(.nii.gz|.nii)}
OUTFN=`basename ${OUTFN}`
OUTFN="${OUTFN}${l}"
DEFORMED="${outdir}/${OUTFN}${l}WarpedToTemplate.nii.gz"
Expand Down

0 comments on commit b1a0233

Please sign in to comment.