Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minipig landmark Initializations #19

Open
hjmjohnson opened this issue Apr 10, 2019 · 2 comments
Open

Minipig landmark Initializations #19

hjmjohnson opened this issue Apr 10, 2019 · 2 comments
Assignees

Comments

@hjmjohnson
Copy link
Member

hjmjohnson commented Apr 10, 2019

Use landmark initialization to generate a starting point for registering mini-pigs to human brains.

Script to perform landmark registration

#!/bin/bash
# \author Hans J. Johnson
# Script to test BRAINSLandmarkInitializer in preparation for ANTs
# MALF based segmentations.

FLMKFILE="$(pwd)/sub-Ada165/ses-20130321/sub-Ada165_ses-20130321_run-094402_T1w_2_markup.fcsv"
MLMKFILE="$(pwd)/sub-Adelheid313/ses-20160801/sub-Adelheid313_ses-20160801_run-102230_T1w_markup.fcsv"
WTSFILE="$(pwd)/mplmk.wts"

# module load BRIANSTools/201904??
BINDIR=/Users/johnsonhj/src/BT-11/bin

TFMTYPE=AffineTransform
#TFMTYPE=VersorRigid3DTransform

M2F_TFM="$(pwd)/Adelheid313-20160801_2_Ada165-20130321_${TFMTYPE}.h5"

INTERPMODE=Linear
if [[ ${TFMTYPE} ==  "VersorRigid3DTransform" ]]; then
  INTERPMODE=ResampleInPlace
fi

${BINDIR}/BRAINSLandmarkInitializer \
   --inputMovingLandmarkFilename "${MLMKFILE}" \
   --inputFixedLandmarkFilename "${FLMKFILE}" \
   --inputWeightFilename "${WTSFILE}" \
   --outputTransformType ${TFMTYPE} \
   --outputTransformFilename "${M2F_TFM}"

FIMGFILE="$(pwd)/sub-Ada165/ses-20130321/sub-Ada165_ses-20130321_run-094402_T1w.nii"
MIMGFILE="$(pwd)/sub-Adelheid313/ses-20160801/sub-Adelheid313_ses-20160801_run-102230_T1w.nii"
OUTFILE="$(pwd)/warped_${TFMTYPE}_sub-Adelheid313_ses-20160801_run-102230_T1w.nii"

${BINDIR}/BRAINSResample \
   --interpolationMode ${INTERPMODE} \
   --warpTransform "${M2F_TFM}" \
   --pixelType short \
   --outputVolume "${OUTFILE}" \
   --inputVolume "${MIMGFILE}" \
   --referenceVolume "${FIMGFILE}"
#  --inverseTransform \

echo lsl "${OUTFILE}"  "${FIMGFILE}"
@KKnoernschild
Copy link
Contributor

I do not see the weight file, and then script errors out since the .h5 file is not already created.

@hjmjohnson
Copy link
Member Author

Sorry,
Here is a zipped version of that file:

mplmk.wts.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants