"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Demos/TriD/testimg.p" between
PDL-2.077.tar.gz and PDL-2.078.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

testimg.p  (PDL-2.077):testimg.p  (PDL-2.078)
use blib;
use Carp;
$SIG{__DIE__} = sub {die Carp::longmess(@_);};
use PDL; use PDL;
use PDL::Graphics::TriD; use PDL::Graphics::TriD;
use PDL::Graphics::TriD::Image; use PDL::Graphics::TriD::Image;
use PDL::IO::Pic;
$PDL::Graphics::TriD::verbose //= 0; $PDL::Graphics::TriD::verbose //= 0;
my $win = PDL::Graphics::TriD::get_current_window(); my $win = PDL::Graphics::TriD::get_current_window();
my $vp = $win->new_viewport(0,0,1,1); my $graph = PDL::Graphics::TriD::Graph->new;
$graph->default_axes;
# Here we show an 8-dimensional (!!!!!) RGB image to test Image.pm # Here we show an 8-dimensional (!!!!!) RGB image to test Image.pm
my $r = zeroes(4,5,6,7,2,2,2,2)+0.1; my $r = zeroes(4,5,6,7,2,2,2,2)+0.1;
my $g = zeroes(4,5,6,7,2,2,2,2); my $g = zeroes(4,5,6,7,2,2,2,2);
my $b = zeroes(4,5,6,7,2,2,2,2); my $b = zeroes(4,5,6,7,2,2,2,2);
(my $tmp = $r->slice(":,:,2,2")) .= 1; (my $tmp = $r->slice(":,:,2,2")) .= 1;
($tmp = $r->slice(":,:,:,1")) .= 0.5; ($tmp = $r->slice(":,:,:,1")) .= 0.5;
($tmp = $g->slice("2,:,1,2")) .= 1; ($tmp = $g->slice("2,:,1,2")) .= 1;
($tmp = $b->slice("2,3,1,:")) .= 1; ($tmp = $b->slice("2,3,1,:")) .= 1;
$vp->clear_objects(); $graph->add_dataseries(PDL::Graphics::TriD::Image->new([$r,$g,$b]));
$vp->add_object(new PDL::Graphics::TriD::Image([$r,$g,$b])); $graph->scalethings;
$win->twiddle(); $win->clear_objects;
$win->add_object($graph);
$win->twiddle;
 End of changes. 4 change blocks. 
7 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)