Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fdt
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
fdt
Commits
0a9b743a
Commit
0a9b743a
authored
20 years ago
by
Mark Jenkinson
Browse files
Options
Downloads
Patches
Plain Diff
Used centralised mm code
parent
64e140cb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fdt.tcl
+21
-12
21 additions, 12 deletions
fdt.tcl
with
21 additions
and
12 deletions
fdt.tcl
+
21
−
12
View file @
0a9b743a
...
@@ -300,20 +300,29 @@ proc mm_to_voxels { X Y Z mask } {
...
@@ -300,20 +300,29 @@ proc mm_to_voxels { X Y Z mask } {
upvar $Y cY
upvar $Y cY
upvar $Z cZ
upvar $Z cZ
set o1
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
origin1"
]
set o2
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
origin2"
]
set vcX
[
exec sh -c
"echo
$c
X
$c
Y
$c
Z |
$
FSLDIR/bin/tal2imgcoord -img
$mask
-vox - | awk '{print
$1
}'"
]
set o3
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
origin3"
]
set vcY
[
exec sh -c
"echo
$c
X
$c
Y
$c
Z |
$
FSLDIR/bin/tal2imgcoord -img
$mask
-vox - | awk '{print
$2
}'"
]
set vcZ
[
exec sh -c
"echo
$c
X
$c
Y
$c
Z |
$
FSLDIR/bin/tal2imgcoord -img
$mask
-vox - | awk '{print
$3
}'"
]
if
{
$o1 != 0 && $o2 != 0 && $o3 != 0
}
{
set cX $vcX
set o1
[
expr $o1 - 0.5
]
set cY $vcY
set o2
[
expr $o2 - 1.5
]
set cZ $vcZ
set o3
[
expr $o3 - 0.5
]
}
#set o1
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
origin1"
]
#set o2
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
origin2"
]
#set o3
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
origin3"
]
#if
{
$o1 != 0 && $o2 != 0 && $o3 != 0
}
{
# set o1 [ expr $o1 - 0.5 ]
# set o2 [ expr $o2 - 1.5 ]
# set o3 [ expr $o3 - 0.5 ]
#
}
# puts "Using origin $o1 $o2 $o3"
# puts "Using origin $o1 $o2 $o3"
set cX
[
expr int
(
(
double
(
$c
X
)
/
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
pixdim1"
]
)
+ $o1
)
]
#
set cX
[
expr int
(
(
double
(
$c
X
)
/
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
pixdim1"
]
)
+ $o1
)
]
set cY
[
expr int
(
(
double
(
$c
Y
)
/
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
pixdim2"
]
)
+ $o2
)
]
#
set cY
[
expr int
(
(
double
(
$c
Y
)
/
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
pixdim2"
]
)
+ $o2
)
]
set cZ
[
expr int
(
(
double
(
$c
Z
)
/
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
pixdim3"
]
)
+ $o3
)
]
#
set cZ
[
expr int
(
(
double
(
$c
Z
)
/
[
exec sh -c
"
$
FSLDIR/bin/avwval
$mask
pixdim3"
]
)
+ $o3
)
]
# puts "Setting co-ordinates $cX $cY $cZ"
# puts "Setting co-ordinates $cX $cY $cZ"
}
}
...
...
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