[448bb5]: lib / Panotools / Script / Line / Mask.pm  Maximize  Restore  History

Download this file

64 lines (46 with data), 1.3 kB

 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package Panotools::Script::Line::Mask;
use strict;
use warnings;
use Panotools::Script::Line;
use vars qw /@ISA/;
@ISA = qw /Panotools::Script::Line/;
=head1 NAME
Panotools::Script::Line::Mask - Image Mask
=head1 SYNOPSIS
Optional image masks are described by a 'k' line
=head1 DESCRIPTION
i2 Set image number this mask applies to
t0 Type for mask:
0 - negative (exclude region)
1 - positive (include region)
2 - exclude region from all images in the same stack
3 - include region from all images in the same stack
4 - exclude region from all images with the same lens
p"1262 2159 1402 2065 1468 2003" List of node coordinates
Coordinates are in pairs, at least three pairs are required
=cut
sub _defaults
{
my $self = shift;
}
sub _valid { return '^([itp])(.*)' }
sub Identifier
{
my $self = shift;
return "k";
}
sub Report
{
my $self = shift;
my @report;
return [] unless defined $self->{t};
my $type = 'Negative';
$type = 'Positive' if $self->{t} == 1;
my $nodes = $self->{p};
$nodes =~ s/(^"|"$)//;
my @nodes = split ' ', $nodes;
push @report, ['Mask type', $type];
push @report, ['Nodes', scalar @nodes / 2];
[@report];
}
1;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks