Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
siena
Commits
fce07fba
Commit
fce07fba
authored
19 years ago
by
Mark Jenkinson
Browse files
Options
Downloads
Patches
Plain Diff
Changed convert_xfm usage to non-medx style
parent
7b81cf5b
No related branches found
No related tags found
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
lesions_0.1
+2
-2
2 additions, 2 deletions
lesions_0.1
lesions_0.2
+2
-2
2 additions, 2 deletions
lesions_0.2
lesions_0.3
+2
-2
2 additions, 2 deletions
lesions_0.3
siena
+3
-3
3 additions, 3 deletions
siena
siena_flirt
+3
-3
3 additions, 3 deletions
siena_flirt
sienax
+1
-1
1 addition, 1 deletion
sienax
with
13 additions
and
13 deletions
lesions_0.1
+
2
−
2
View file @
fce07fba
...
@@ -38,7 +38,7 @@ ${FSLDIR}/bin/fast -e -ov $1_brain
...
@@ -38,7 +38,7 @@ ${FSLDIR}/bin/fast -e -ov $1_brain
# register t1 to standard space and invert transform
# register t1 to standard space and invert transform
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
$1_brain
-omat
$1_brain_2_tal
.mat
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
$1_brain
-omat
$1_brain_2_tal
.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-matonly
-omat
tal_2_
$1_brain
.mat
$1_brain_2_tal
.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
tal_2_
$1_brain
.mat
$1_brain_2_tal
.mat
# dilate (6mm) standard space structural segmentation, bring into t1 space and re-binarise
# dilate (6mm) standard space structural segmentation, bring into t1 space and re-binarise
${
FSLDIR
}
/bin/avwmaths
${
FSLDIR
}
/etc/standard/avg152T1_strucseg
-thr
3.5
-bin
-dil
-dil
-dil
strucseg_2_
$1_brain
${
FSLDIR
}
/bin/avwmaths
${
FSLDIR
}
/etc/standard/avg152T1_strucseg
-thr
3.5
-bin
-dil
-dil
-dil
strucseg_2_
$1_brain
...
@@ -56,7 +56,7 @@ ${FSLDIR}/bin/avwmaths $1_csf -dil2 -mul strucseg_2_$1_brain -add $1_grot -bin $
...
@@ -56,7 +56,7 @@ ${FSLDIR}/bin/avwmaths $1_csf -dil2 -mul strucseg_2_$1_brain -add $1_grot -bin $
# register t2 to t1 and invert transform
# register t2 to t1 and invert transform
${
FSLDIR
}
/bin/flirt
-in
$2
-ref
$1
-omat
$2_to_$1
.mat
${
FSLDIR
}
/bin/flirt
-in
$2
-ref
$1
-omat
$2_to_$1
.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-matonly
-omat
$1_to_$2
.mat
$2_to_$1
.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
$1_to_$2
.mat
$2_to_$1
.mat
# transform t1 brain mask into t2 space, dilate slightly and apply to t2 to get t2 brain
# transform t1 brain mask into t2 space, dilate slightly and apply to t2 to get t2 brain
${
FSLDIR
}
/bin/flirt
-in
$1_brain_mask
-out
$2_brain_mask
-ref
$2
-applyxfm
-init
$1_to_$2
.mat
${
FSLDIR
}
/bin/flirt
-in
$1_brain_mask
-out
$2_brain_mask
-ref
$2
-applyxfm
-init
$1_to_$2
.mat
...
...
This diff is collapsed.
Click to expand it.
lesions_0.2
+
2
−
2
View file @
fce07fba
...
@@ -54,7 +54,7 @@ ${FSLDIR}/bin/fast -e -ov ${A}_brain
...
@@ -54,7 +54,7 @@ ${FSLDIR}/bin/fast -e -ov ${A}_brain
# register t1 to standard space and invert transform
# register t1 to standard space and invert transform
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
${
A
}
_brain
-omat
${
A
}
_brain_2_tal.mat
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
${
A
}
_brain
-omat
${
A
}
_brain_2_tal.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-matonly
-omat
tal_2_
${
A
}
_brain.mat
${
A
}
_brain_2_tal.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
tal_2_
${
A
}
_brain.mat
${
A
}
_brain_2_tal.mat
# dilate (6mm) standard space ventricles+deep-grey, bring into t1 space and re-binarise to make "CENTRAL MASK"
# dilate (6mm) standard space ventricles+deep-grey, bring into t1 space and re-binarise to make "CENTRAL MASK"
${
FSLDIR
}
/bin/avwmaths
${
FSLDIR
}
/etc/standard/avg152T1_strucseg
-thr
3.5
-bin
-dil
-dil
-dil
strucseg_2_
${
A
}
_brain
${
FSLDIR
}
/bin/avwmaths
${
FSLDIR
}
/etc/standard/avg152T1_strucseg
-thr
3.5
-bin
-dil
-dil
-dil
strucseg_2_
${
A
}
_brain
...
@@ -72,7 +72,7 @@ ${FSLDIR}/bin/avwmaths ${A}_csf -dil2 -mul strucseg_2_${A}_brain -add ${A}_grot
...
@@ -72,7 +72,7 @@ ${FSLDIR}/bin/avwmaths ${A}_csf -dil2 -mul strucseg_2_${A}_brain -add ${A}_grot
# register t2 to t1 and invert transform
# register t2 to t1 and invert transform
${
FSLDIR
}
/bin/flirt
-in
$B
-ref
$A
-omat
${
B
}
_to_
${
A
}
.mat
${
FSLDIR
}
/bin/flirt
-in
$B
-ref
$A
-omat
${
B
}
_to_
${
A
}
.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-matonly
-omat
${
A
}
_to_
${
B
}
.mat
${
B
}
_to_
${
A
}
.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
${
A
}
_to_
${
B
}
.mat
${
B
}
_to_
${
A
}
.mat
# transform t1 brain mask into t2 space and apply to t2 to get t2_brain
# transform t1 brain mask into t2 space and apply to t2 to get t2_brain
${
FSLDIR
}
/bin/flirt
-in
${
A
}
_brain_mask
-out
${
B
}
_brain_mask
-ref
$B
-applyxfm
-init
${
A
}
_to_
${
B
}
.mat
${
FSLDIR
}
/bin/flirt
-in
${
A
}
_brain_mask
-out
${
B
}
_brain_mask
-ref
$B
-applyxfm
-init
${
A
}
_to_
${
B
}
.mat
...
...
This diff is collapsed.
Click to expand it.
lesions_0.3
+
2
−
2
View file @
fce07fba
...
@@ -55,7 +55,7 @@ ${FSLDIR}/bin/fast -e -ov ${A}_brain
...
@@ -55,7 +55,7 @@ ${FSLDIR}/bin/fast -e -ov ${A}_brain
# register t1 to standard space and invert transform
# register t1 to standard space and invert transform
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
${
A
}
_brain
-omat
${
A
}
_brain_2_tal.mat
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
${
A
}
_brain
-omat
${
A
}
_brain_2_tal.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-matonly
-omat
tal_2_
${
A
}
_brain.mat
${
A
}
_brain_2_tal.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
tal_2_
${
A
}
_brain.mat
${
A
}
_brain_2_tal.mat
# dilate (6mm) standard space ventricles+deep-grey, bring into t1 space and re-binarise to make "CENTRAL MASK"
# dilate (6mm) standard space ventricles+deep-grey, bring into t1 space and re-binarise to make "CENTRAL MASK"
${
FSLDIR
}
/bin/avwmaths
${
FSLDIR
}
/etc/standard/avg152T1_strucseg
-thr
3.5
-bin
-dil
-dil
-dil
strucseg_2_
${
A
}
_brain
${
FSLDIR
}
/bin/avwmaths
${
FSLDIR
}
/etc/standard/avg152T1_strucseg
-thr
3.5
-bin
-dil
-dil
-dil
strucseg_2_
${
A
}
_brain
...
@@ -73,7 +73,7 @@ ${FSLDIR}/bin/avwmaths ${A}_csf -dil2 -mul strucseg_2_${A}_brain -add ${A}_grot
...
@@ -73,7 +73,7 @@ ${FSLDIR}/bin/avwmaths ${A}_csf -dil2 -mul strucseg_2_${A}_brain -add ${A}_grot
# register t2 to t1 and invert transform
# register t2 to t1 and invert transform
${
FSLDIR
}
/bin/flirt
-in
$B
-ref
$A
-omat
${
B
}
_to_
${
A
}
.mat
${
FSLDIR
}
/bin/flirt
-in
$B
-ref
$A
-omat
${
B
}
_to_
${
A
}
.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-matonly
-omat
${
A
}
_to_
${
B
}
.mat
${
B
}
_to_
${
A
}
.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
${
A
}
_to_
${
B
}
.mat
${
B
}
_to_
${
A
}
.mat
# transform t1 brain mask into t2 space and apply to t2 to get t2_brain
# transform t1 brain mask into t2 space and apply to t2 to get t2_brain
${
FSLDIR
}
/bin/flirt
-in
${
A
}
_brain_mask
-out
${
B
}
_brain_mask
-ref
$B
-applyxfm
-init
${
A
}
_to_
${
B
}
.mat
${
FSLDIR
}
/bin/flirt
-in
${
A
}
_brain_mask
-out
${
B
}
_brain_mask
-ref
$B
-applyxfm
-init
${
A
}
_to_
${
B
}
.mat
...
...
This diff is collapsed.
Click to expand it.
siena
+
3
−
3
View file @
fce07fba
...
@@ -127,10 +127,10 @@ if [ $dotal = 1 ] ; then
...
@@ -127,10 +127,10 @@ if [ $dotal = 1 ] ; then
echo
"---------- standard space masking ----------------------------------"
>>
${
A
}
_to_
${
B
}
.siena
echo
"---------- standard space masking ----------------------------------"
>>
${
A
}
_to_
${
B
}
.siena
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
${
A
}
_brain
-omat
${
A
}
_to_tal.mat
>>
${
A
}
_to_
${
B
}
.siena
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
${
A
}
_brain
-omat
${
A
}
_to_tal.mat
>>
${
A
}
_to_
${
B
}
.siena
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
${
B
}
_brain
-omat
${
B
}
_to_tal.mat
>>
${
A
}
_to_
${
B
}
.siena
${
FSLDIR
}
/bin/flirt
-ref
${
FSLDIR
}
/etc/standard/avg152T1_brain
-in
${
B
}
_brain
-omat
${
B
}
_to_tal.mat
>>
${
A
}
_to_
${
B
}
.siena
${
FSLDIR
}
/bin/convert_xfm
-matonly
-inverse
-omat
${
A
}
_to_tal_inv.mat
${
A
}
_to_tal.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
${
A
}
_to_tal_inv.mat
${
A
}
_to_tal.mat
${
FSLDIR
}
/bin/convert_xfm
-matonly
-inverse
-omat
${
B
}
_to_tal_inv.mat
${
B
}
_to_tal.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
${
B
}
_to_tal_inv.mat
${
B
}
_to_tal.mat
${
FSLDIR
}
/bin/convert_xfm
-matonly
-concat
${
B
}
_to_tal_inv.mat
-omat
${
A
}
_to_
${
B
}
_tmp.mat
${
A
}
_to_tal.mat
${
FSLDIR
}
/bin/convert_xfm
-concat
${
B
}
_to_tal_inv.mat
-omat
${
A
}
_to_
${
B
}
_tmp.mat
${
A
}
_to_tal.mat
RMSDIFF
=
`
${
FSLDIR
}
/bin/rmsdiff
${
A
}
_to_
${
B
}
.mat
${
A
}
_to_
${
B
}
_tmp.mat
$A
|
sed
's/\..*$/ /g'
`
# last part makes it integer
RMSDIFF
=
`
${
FSLDIR
}
/bin/rmsdiff
${
A
}
_to_
${
B
}
.mat
${
A
}
_to_
${
B
}
_tmp.mat
$A
|
sed
's/\..*$/ /g'
`
# last part makes it integer
echo
"rmsdiff for standard space transform is
$RMSDIFF
mm"
>>
${
A
}
_to_
${
B
}
.siena
echo
"rmsdiff for standard space transform is
$RMSDIFF
mm"
>>
${
A
}
_to_
${
B
}
.siena
if
[
$RMSDIFF
-ge
10
]
;
then
if
[
$RMSDIFF
-ge
10
]
;
then
...
...
This diff is collapsed.
Click to expand it.
siena_flirt
+
3
−
3
View file @
fce07fba
...
@@ -32,11 +32,11 @@ ${FSLDIR}/bin/pairreg ${A2}_brain ${A1}_brain ${A2}_brain_skull ${A1}_brain_skul
...
@@ -32,11 +32,11 @@ ${FSLDIR}/bin/pairreg ${A2}_brain ${A1}_brain ${A2}_brain_skull ${A1}_brain_skul
# replace both transforms with "average" (reduces error level AND makes system symmetric)
# replace both transforms with "average" (reduces error level AND makes system symmetric)
F
=
${
A1
}
_to_
${
A2
}
.mat
F
=
${
A1
}
_to_
${
A2
}
.mat
B
=
${
A2
}
_to_
${
A1
}
.mat
B
=
${
A2
}
_to_
${
A1
}
.mat
${
FSLDIR
}
/bin/convert_xfm
-matonly
-concat
$B
-omat
tmp_
${
F
}
_then_
${
B
}
$F
${
FSLDIR
}
/bin/convert_xfm
-concat
$B
-omat
tmp_
${
F
}
_then_
${
B
}
$F
${
FSLDIR
}
/bin/avscale tmp_
${
F
}
_then_
${
B
}
${
A1
}
>
tmp_
${
F
}
_then_
${
B
}
.avscale
${
FSLDIR
}
/bin/avscale tmp_
${
F
}
_then_
${
B
}
${
A1
}
>
tmp_
${
F
}
_then_
${
B
}
.avscale
${
FSLDIR
}
/bin/extracttxt Backward tmp_
${
F
}
_then_
${
B
}
.avscale 4 1
>
tmp_
${
F
}
_then_
${
B
}
_halfback
${
FSLDIR
}
/bin/extracttxt Backward tmp_
${
F
}
_then_
${
B
}
.avscale 4 1
>
tmp_
${
F
}
_then_
${
B
}
_halfback
${
FSLDIR
}
/bin/convert_xfm
-matonly
-concat
tmp_
${
F
}
_then_
${
B
}
_halfback
-omat
$F
$F
${
FSLDIR
}
/bin/convert_xfm
-concat
tmp_
${
F
}
_then_
${
B
}
_halfback
-omat
$F
$F
${
FSLDIR
}
/bin/convert_xfm
-inverse
-matonly
-omat
$B
$F
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
$B
$F
/bin/rm tmp_
${
F
}
_then_
${
B
}
tmp_
${
F
}
_then_
${
B
}
.avscale tmp_
${
F
}
_then_
${
B
}
_halfback
/bin/rm tmp_
${
F
}
_then_
${
B
}
tmp_
${
F
}
_then_
${
B
}
.avscale tmp_
${
F
}
_then_
${
B
}
_halfback
# replace the .mat matrix that takes 2->1 with one that takes 2->halfway and one that takes 1->halfway
# replace the .mat matrix that takes 2->1 with one that takes 2->halfway and one that takes 1->halfway
...
...
This diff is collapsed.
Click to expand it.
sienax
+
1
−
1
View file @
fce07fba
...
@@ -116,7 +116,7 @@ echo "VSCALING $vscale" >> ${I}.sienax
...
@@ -116,7 +116,7 @@ echo "VSCALING $vscale" >> ${I}.sienax
echo
""
>>
${
I
}
.sienax
echo
""
>>
${
I
}
.sienax
echo
"---------- mask with talairach mask ---------------------------------"
>>
${
I
}
.sienax
echo
"---------- mask with talairach mask ---------------------------------"
>>
${
I
}
.sienax
${
FSLDIR
}
/bin/convert_xfm
-matonly
-inverse
-omat
${
I
}
2tal_inv.mat
${
I
}
2tal.mat
${
FSLDIR
}
/bin/convert_xfm
-inverse
-omat
${
I
}
2tal_inv.mat
${
I
}
2tal.mat
MASK
=
${
FSLDIR
}
/etc/standard/avg152T1_brain_mask_dil
MASK
=
${
FSLDIR
}
/etc/standard/avg152T1_brain_mask_dil
if
[
"
$talroi
"
!=
""
]
;
then
if
[
"
$talroi
"
!=
""
]
;
then
${
FSLDIR
}
/bin/avwmaths
$MASK
$talroi
${
I
}
_talmaskroi
${
FSLDIR
}
/bin/avwmaths
$MASK
$talroi
${
I
}
_talmaskroi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment