-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_thumbnails_other.pl
executable file
·48 lines (45 loc) · 1.14 KB
/
make_thumbnails_other.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /usr/bin/perl -w
#
my $path = "/data/cryoem/cryoemdata/cache/";
my @files = glob("*sq.mrc");
$files[0] =~ m/(23jun\d\d\w)/;
my $session = $1;
$path .= $session . "/";
print "session $session path $path\n";
unless (-e $path) {`mkdir -p $path`;}
my @hlfiles = glob("*hl.mrc");
push (@files,@hlfiles);
foreach my $file (@files) {
my $pngfile = $file;
$pngfile = $path . $pngfile;
$pngfile =~ s/mrc/png/;
my $jpgfile = $pngfile;
$jpgfile =~ s/png/jpg/;
`e2proc2d.py $file $pngfile`;
`convert -geometry 1024x768 $pngfile $jpgfile`;
unlink $pngfile;
unlink $file;
}
@files=glob("*gr.mrc");
foreach my $file (@files) {
my $pngfile = $file;
$pngfile = $path . $pngfile;
$pngfile =~ s/mrc/png/;
my $jpgfile = $pngfile;
$jpgfile =~ s/png/jpg/;
`e2proc2d.py $file $pngfile`;
`convert $pngfile $jpgfile`;
unlink $pngfile;
}
@files=glob("*e?n.mrc");
foreach my $file (@files) {
my $pngfile = $file;
$pngfile = $path . $pngfile;
$pngfile =~ s/mrc/png/;
my $jpgfile = $pngfile;
$jpgfile =~ s/png/jpg/;
`e2proc2d.py $file $pngfile`;
`convert $pngfile $jpgfile`;
unlink $pngfile;
unlink $file;
}