Hi Ingo,

With or without the curly braces - it's the same for me.  Also - the error 
happens before the map stage, during the call to 't_linear'.

I will write a simple Bilinear Interpolation myself, I would have just 
preferred to use the in-built capability in 'PDL::Transform'.

---
pdl> use PDL::Transform;                                                        
                                                                                
                                                              
                                                 
pdl> $im = rfits "m51.fits"                                                     
                                                                                
                                                              
Reading IMAGE data...            
BITPIX =  -32  size = 262144 pixels 
Reading  1048576  bytes         
BSCALE = 1 &&  BZERO = 0  
                                                 
pdl> $tr = t_linear({rot=>30});                                                 
                                                                                
                                                              
Undefined subroutine &PDL::Transform::Linear::identity called at transform.pd 
line 2729.
                                                 
pdl> $tr = t_linear(rot=>30);                                                   
                                                                                
                                                              
Undefined subroutine &PDL::Transform::Linear::identity called at transform.pd 
line 2729.
---

cheers,

Paul


> On 18 Oct 2022, at 10:05 am, Ingo Schmid <ingo...@gmx.at> wrote:
> 
> Dear Paul,
> 
> first, I think you do not need the curly { } around rot. 
> 
> Second, map needs $tr and $im. You can call it $tr->map($im) or 
> $im->map($tr), as far as I know.
> 
> With these changes, it works for me.
> 
> use PDL;
> #use PDL::IO::;
> use PDL::Transform;
> use PDL::Graphics::Gnuplot;
> 
> $im = rfits('/data/ingo/git/PDL/pdl-code/m51.fits');
> $tr = t_linear({rot=>30});
> print $Tr;
> $im1 = $tr->map($im);
> gplot {out=>'i1.png',term=>'png',},with=>'image',$im;
> gplot {out=>'i2.png',term=>'png',},with=>'image',$im1;
> 
> 
> 
> 
> Ingo
> 
> On 10/18/22 07:52, Paul Goodall wrote:
>> Hi perldl peeps,
>> 
>> I'm trying to do something that should be really simple, but it seems I'm 
>> falling over at the first hurdle.
>> I've replicated the error in it's simplest form from the example given in 
>> the docs as follows, and I've highlighted the offending line.
>> 
>> ----
>> use PDL <https://metacpan.org/pod/PDL::Transform>;
>> use PDL::IO::Image <https://metacpan.org/pod/PDL::Transform>;
>> use PDL::Transform <https://metacpan.org/pod/PDL::Transform>;
>> $im = rfits('m51.fits');
>> $tr = t_linear({rot=>30});
>> $im1 = $tr->map($tr); 
>> ---
>> And I'm hit with this one:
>> 
>> > Undefined subroutine &PDL::Transform::Linear::identity called at 
>> > transform.pd line 2729.
>> 
>> I'm using PDL v2.080 on Ubuntu 20.04 (focal).
>> 
>> This feels like it's something that has been solved a million times, but I 
>> can't seem to find the solution.  Am I looking at the wrong Docs or doing 
>> something obviously silly?
>> 
>> cheers,
>> 
>> Paul
>> 
>> 
>> 
>> _______________________________________________
>> pdl-general mailing list
>> pdl-general@lists.sourceforge.net <mailto:pdl-general@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/pdl-general 
>> <https://lists.sourceforge.net/lists/listinfo/pdl-general>
> _______________________________________________
> pdl-general mailing list
> pdl-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-general

_______________________________________________
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to