Branch Coverage

blib/lib/PDL/Transform/Color.pm
Criterion Covered Total %
branch 70 202 34.6


line true false branch
412 1 9 if (exists $me->{'params'}{'gamma'} and defined $me->{'params'}{'gamma'} and $me->{'params'}{'gamma'} != 1) { }
464 3 0 if ($opt->{'gamma'} != 1)
473 2 0 if ($opt->{'gamma'} != 1)
546 1 3 if ($opt->{'display_gamma'} != 1)
552 4 0 if ($opt->{'byte'}) { }
0 0 elsif ($opt->{'clip'}) { }
566 0 2 if ($opt->{'display_gamma'} != 1)
570 2 0 if ($opt->{'clip'})
621 1 1 $a->is_inplace ? :
636 0 1 $a->is_inplace ? :
666 1 0 if ($opt->{'byte'}) { }
0 0 elsif ($opt->{'clip'}) { }
999 0 0 if (0 + @_ % 2) { }
1007 0 0 if (defined $name) { }
1020 1 1 unless (0 + @_)
1025 22 3 $PDL::Transform::Color::pc_tab->{$k}{'phot'} ? :
1034 1 0 (0 + @_) % 2 ? :
1040 0 1 if ($lut_name =~ s/\-C([0-5])$//i)
1047 0 1 unless ($lut_name)
1068 0 1 unless (defined $PDL::Transform::Color::pc_tab->{$lut_name})
1073 0 1 if defined $me->{'params'}{'domain'}
1076 0 1 unless defined $me->{'params'}{'irange'}
1077 0 1 unless (ref $me->{'params'}{'irange'} eq 'ARRAY')
1081 0 0 if ($me->{'params'}{'irange'}[0] == $me->{'params'}{'irange'}[1] and (defined $me->{'params'}{'irange'}[0] and defined $me->{'params'}{'irange'}[1]))
1088 0 1 if ($mod_combo)
1089 0 0 if $me->{'params'}{'combination'}
1094 0 1 if ($me->{'params'}{'combination'} < 0 or $me->{'params'}{'combination'} > 5)
1101 0 1 if ($me->{'params'}{'lut'}{'type'} eq 'hsv') { }
1106 0 0 if ($me->{'params'}{'combination'})
1112 0 0 if $me->{'params'}{'combination'} > 2
1132 0 1 do { not defined $min } ? :
1 0 defined $min || defined $max ? :
1140 0 1 if ($min == $max or not &isfinite($min) or not &isfinite($max))
1150 0 1 if ($opt->{'lut'}{'split'})
1153 0 0 if ($split == 0.5) { }
1162 0 1 if ($opt->{'lut'}{'phot'} and $opt->{'perceptual'})
1166 1 0 if ($opt->{'clip'})
1167 0 1 if ($split) { }
1174 0 1 if (defined $opt->{'lut'}{'igamma'})
1178 0 1 if ($split)
1179 0 0 if ($split == 0.5) { }
1188 0 0 if ($opt->{'clip'})
1202 0 1 if (defined $opt->{'lut'}{'ogamma'})
1210 0 1 if ($me->{'params'}{'lut'}{'type'} eq 'hsv')
1214 0 1 if (abs $me->{'params'}{'gamma'} - 1 > 1e-05)
1218 1 0 unless ($me->{'params'}{'lsRGB'})
1287 0 2 if (defined $me->{'params'}{'rgb_system'}) { }
1322 0 0 if ($me->{'params'}{'use_system_gamma'})
1333 0 1 if ($in->is_inplace)
1344 0 1 if ($in->is_inplace)
1379 0 1 if ($in->is_inplace)
1391 0 0 if ($in->is_inplace)
1435 0 0 if ($XYZ->is_inplace)
1453 0 0 if ($in->is_inplace)
1554 0 0 if ($in->is_inplace)
1571 0 0 if ($in->is_inplace)
1654 0 2 if (defined $opt->{'htgamma'} and $opt->{'htgamma'} != 1)
1658 0 2 if ($opt->{'clip'})
1662 0 2 if ($opt->{'byte'})
1674 0 2 if ($opt->{'byte'})
1678 0 2 if (defined $opt->{'htgamma'} and $opt->{'htgamma'} != 1)
1771 1 1 if $me->{'params'}{'hsv'}
1786 0 2 if ($opt->{'hue_linear'}) { }
1808 1 1 if ($opt->{'hsv'}) { }
1817 0 2 if ($opt->{'lgamma'} != 1)
1821 0 2 if ($in->is_inplace)
1835 0 2 if ($opt->{'lgamma'} != 1)
1842 1 1 if ($opt->{'hsv'}) { }
1850 0 2 if ($opt->{'hue_linear'}) { }
1862 0 2 if ($in->is_inplace)
1939 0 0 unless (UNIVERSAL::isa($new_illuminant, 'PDL'))
1942 0 0 unless (UNIVERSAL::isa($me->{'params'}{'from'}, 'PDL'))
1947 0 0 if (UNIVERSAL::isa($me->{'params'}{'method'}, 'PDL')) { }
0 0 elsif ($me->{'params'}{'method'} =~ /^B/i or length $me->{'params'}{'method'} == 0) { }
0 0 elsif ($me->{'params'}{'method'} =~ /^[VK]/i) { }
0 0 elsif ($me->{'params'}{'method'} =~ /^[XC]/i) { }
1948 0 0 if ($me->{'params'}{'method'}->ndims == 2 and $me->{'params'}{'method'}->dim(0) == 3 and $me->{'params'}{'method'}->dim(1) == 3) { }
1982 0 0 if ($opt->{'basis'} =~ /^X/i) { }
1996 0 0 if ($opt->{'basis'} =~ /^X/i) { }
2003 0 0 if (exists $me->{'params'}{'gamma'} and defined $me->{'params'}{'gamma'} and $me->{'params'}{'gamma'} != 1) { }
2083 0 0 if ($me->{'params'}{'use_system_gammas'}) { }
2151 0 18 if any($D < 40) or any($D > 250)
2270 0 20 if (UNIVERSAL::isa($name, 'PDL'))
2271 0 0 if ($name->nelem == 2 || $name->nelem == 3 and $name->dim(0) == $name->nelem) { }
2281 0 20 if ($name =~ /^A/i) { }
0 20 elsif ($name =~ /^B/) { }
1 19 elsif ($name =~ /^C/) { }
18 1 elsif ($name =~ /^D(.*)$/i) { }
1 0 elsif ($name =~ /^E/i) { }
0 0 elsif ($name =~ /^FL?([\d+])(\.[\d])?$/i) { }
0 0 elsif ($name =~ /^HP?(\d)/i) { }
0 0 elsif ($name =~ /^L/i) { }
2294 0 0 if $flno < 1 or $flno > 12 or $flsubno and $flno != 3 or $flsubno > 15
2300 0 0 if ($flno == 3 and $flsubno) { }
2307 0 0 if $hpno < 1 or $hpno > 5
2454 0 0 do { ref $new_rgb eq 'HASH' } ? :
0 0 ref $new_rgb ? :
2457 0 0 if ($PDL::Transform::Color::rgbtab->{$new_rgb_name}) { }
2465 0 0 unless exists $new_rgb->{$k} and defined $new_rgb->{$k} and UNIVERSAL::isa($new_rgb->{$k}, 'PDL') and $new_rgb->{$k}->nelem == 3 and $new_rgb->{$k}->dim(0) == 3
2467 0 0 unless defined $new_rgb->{'gamma'}
2468 0 0 if $bad