Let
and
be corresponding template
and target landmarks respectively. Find the rotation,
,
translation
, and (for lddmm-similitude) scale
which minimize
For lddmm-rigid, scale
is fixed at 1.0.
S. Umeyama, "Least-Squares Estimation of Transformation Parameters Between Two Point Patterns".IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol 12, NO 4, April 1991. (pdf)
lddmm-similitude matching is a program to determine the similarity between two landmark data sets based on rotation, translation, and scale. The program will write the rotation, translation and scale to standard out and create a file representing the transformed template.
lddmm-rigid matching is a program to determine the similarity between two landmark data sets based on rotation and translation. The program will write the rotation and translation to standard out and create a file representing the transformed template.
lddmm-similitude || lddmm-rigid [OPTIONS] x_file y_file tx_file norm_constant [Rts_file]
The following are the command line options.
N x 2 [ x_0 y_0 x_1 y_1 . . x_N y_N ]
And for a 3-D file:
N x 3 [ x_0 y_0 z_0 x_1 y_1 z_1 . . x_N y_N z_N ]
Output File Format:
The program will format the output file based on the extension of the output
file:
#!/usr/bin/perl
$program = "lddmm-similitude";
$start_folder = "/cis/project/botteron/hippocampus/Converted_Lmk";
@inlist= `ls -1 $start_folder/*.lmk`;
$outfile = "/cis/project/botteron/hippocampus/left_scale_list.txt";
&do_sims ($infile, \@outlist);
sub do_sims {
my $outfile = shift;
my $list_ref=shift;
my @list = @$list_ref;
print "$outfile\n";
print "List size: $#list\n";
for($i=0; $i<=$#list; $i++) {
chomp $list[$i];
$list[$i] =~ /^.+\/(.+)/;
$shortlist[$i] = $1;
}
open OUT, "> $outfile";
for($i=0; $i<=$#list; $i++) {
for($j=$i+1; $j<=$#list; $j++) {
$sim = `$program $list[$i] $list[$j] /dev/null 1.0 | cut -f3 -d\\ `;
print OUT "$shortlist[$i]:$shortlist[$j]:$sim";
}
print "Finished $shortlist[$i]\n";
}
close OUT;
}
Software developed with support from National Institutes of Health NCRR grant P41 RR15241.
Last Modified: Friday, 15th April, 2011 @ 11:12am