my $count = 0;
foreach my $nodeName (@NodeNames) {
for (my $i=0; $i<$NumberOfImagesPerPano; $i++) {
unless (-e “$EndingFolder/$nodeName”) {mkdir
“$EndingFolder/$nodeName”;}
foreach my $bracketName (@BracketNames) {
unless (-e “$EndingFolder/$nodeName/$bracketName”)
{mkdir “$EndingFolder/$nodeName/$bracketName”;}
print “Moved $StartingFolder/@ImageFiles[$count] to $En
dingFolder/$nodeName/$bracketName/@ImageFiles[$count]\n”;
rename (“$StartingFolder/@ImageFiles[$count]”, “$Endin
gFolder/$nodeName/$bracketName/@ImageFiles[$count]”);
$count++;
}
}
}
ptMa cpa n oiM a G ESo r tE r.p l
#!/usr/bin/perl
This script takes sets of pano image files and sorts them into
folders and bracketed sets, saving a lot of time compared to
manually creating new folders, naming them, and then moving
files from the original to the sets. The specified folder must
contain a complete sets of files, i.e., if there are 10 nodes
and each node consists of 8 shots, each of which has 3 bracketed
images, then the folder must contain 240 images exactly.
This script also loads a PTMac template file, modifies it to use
the images files, and saves it for use in PTBatch.
use strict;
use MacPerl;
Used to set file type and creator for output template file, so
that PTBatch recognizes it.
Path and name of folder with pano images, e.g. /Users/jdoe/
Desktop/Panos/originals
my $StartingFolder = “/Users/kenstuart/Desktop/Carter”;
Path and name of folder to store sorted images.
my $EndingFolder = “/Users/kenstuart/Desktop/Carter”;
Path and name of PTMac template file.
my $PTMacTemplateFile = “/Users/kenstuart/Desktop/template.
ptmac”;