-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
claude
committed
Jan 30, 2007
1 parent
63bd355
commit 6450993
Showing
4 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
2007-01-30 Claude Lepage <[email protected]> | ||
* add icbm_make_templates.pl | ||
|
||
2006-06-22 Claude Lepage <[email protected]> | ||
* modify multispectral_stx_registration for new pipeline | ||
* use model icbm_avg_152_t1_tal_nlin_symmetric_VI in nlfit_smr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dnl Process this file with autoconf to produce a configure script. | ||
|
||
AC_INIT(conglomerate, 1.6.3, [email protected]) | ||
AC_INIT(conglomerate, 1.6.4, [email protected]) | ||
AC_CONFIG_SRCDIR([surface_mask2.c]) | ||
AM_INIT_AUTOMAKE | ||
AC_CONFIG_HEADERS([config.h]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#! /usr/bin/env perl | ||
|
||
# Generate templates for a given model (inspired by icbm_make_templates | ||
# from Neelin). | ||
# | ||
# Claude Lepage - [email protected] | ||
# | ||
# Permission to use, copy, modify, and distribute this software and its | ||
# documentation for any purpose and without fee is hereby granted, | ||
# provided that the above copyright notice appear in all copies. The | ||
# author and the University of Queensland make no representations about the | ||
# suitability of this software for any purpose. It is provided "as is" | ||
# without express or implied warranty. | ||
|
||
use strict; | ||
use warnings "all"; | ||
use File::Temp qw/ tempdir /; | ||
|
||
# Output prefix | ||
my $PREFIX = "icbm_nlin_template"; | ||
|
||
# Dimensions | ||
my $XSTART = -96; | ||
my $YSTART = -132; | ||
my $ZSTART = -78; | ||
|
||
my $XCENTER = 0; | ||
my $YCENTER = -18; | ||
my $ZCENTER = 18; | ||
|
||
my $XLEN = 192; | ||
my $YLEN = 228; | ||
my $ZLEN = 192; | ||
|
||
my @spacings = ( "0.50", "0.75", "1.00", "1.50", "2.00", "3.00", "4.00", "6.00" ); | ||
|
||
my $date = `date`; | ||
chomp( $date ); | ||
|
||
# make tmpfile | ||
my $tmpdir = &tempdir( "template-XXXX", TMPDIR => 1, CLEANUP => 1 ); | ||
|
||
# Generate the templates at each size | ||
|
||
for( my $i = 0; $i < @spacings; $i++ ) { | ||
|
||
my $dx = $XLEN / $spacings[$i] + 1; | ||
my $dy = $YLEN / $spacings[$i] + 1; | ||
my $dz = $ZLEN / $spacings[$i] + 1; | ||
|
||
my $list = "$dx $dy $dz -xstart $XSTART -ystart $YSTART -zstart $ZSTART " . | ||
"-xstep $spacings[$i] -ystep $spacings[$i] -zstep $spacings[$i] " . | ||
"-xdircos 1 0 0 -ydircos 0 1 0 -zdircos 0 0 1"; | ||
print "creating template ${PREFIX}_${spacings[$i]}mm.mnc...\n"; | ||
|
||
open PIPE, ">${tmpdir}/template_${spacings[$i]}.sh"; | ||
print PIPE "#! /bin/csh -f\n"; | ||
print PIPE "limit filesize 4k\n"; | ||
print PIPE "rawtominc -clobber -byte -input /dev/zero ${PREFIX}_${spacings[$i]}mm.mnc " . | ||
"$list -transverse -sattribute xspace:spacetype=talairach_ " . | ||
"-sattribute yspace:spacetype=talairach_ -sattribute zspace:spacetype=talairach_ " . | ||
"-sattribute xspace:units=mm -sattribute yspace:units=mm -sattribute zspace:units=mm " . | ||
"-sattribute \':history=$date >>> icbm_make_templates\'\n"; | ||
close PIPE; | ||
system( "chmod u+x ${tmpdir}/template_${spacings[$i]}.sh" ); | ||
system( "${tmpdir}/template_${spacings[$i]}.sh" ); | ||
unlink( "${tmpdir}/template_${spacings[$i]}.sh" ); | ||
} | ||
|
||
|
||
sub run { | ||
system(@_) == 0 or die; | ||
} | ||
|