Dear Ingo, First, thank you for your quick response.
That is a very good suggestion.. I have been investigating Prima a little and it looks like a nice approach... that may be the easiest and most efficient way to go.. I already looked at first converting piddles to lists (using the list method) and was able to get successful plots. I found the process to be slower than I wanted. However since I am new to PDL I may not have been threading efficiently. I only had a loop that spliced one piddle row of data each time to GD in PerlTk (not the GD version in PDL). If there is a quicker way to exchange data from piddles into list arrays I would like to follow up on your suggestions Also, PLplot has a function to write into memory space and Perl can create filehandles in memory (as strings) but I do not know how to grab one from the other. [ By the way, please let me back up to say that I am using PDL to work with seismic geophysical data. I put all my programs in github (see gllore/L_SU) ] Many thanks and happy piddling! Juan Sent from my iPhone > On 28 Jan 2019, at 04:05, Ingo Schmid <[email protected]> wrote: > > Hi, > > I know this is not an answer to your immediate question but you may want to > consider the Prima toolkit and PDL::Graphics::Prima for interactive image > manipulation. It performs quite well for me. > > That said, ages ago I used perlTk and converted my piddles to perl arrays? > immediately before plotting. I can dig up the code for you, if you like. The > performance was reasonable, I'd say. > > Best wishes > > Ingo > > >> Am 28.01.2019 um 03:32 schrieb Craig DeForest: >> I haven’t looked specifically at how to display images in PerlTk, but >> there’s got to be a straightforward way to transfer the memory. Perl can >> access PDL data directly as a string via the PDL::dataref method, which >> delivers a scalar ref whose contents are the data in the PDL. Doesn’t >> PerlTk load the image into memory before shipping it off to the display >> libraries? >> >>> On Jan 27, 2019, at 5:45 PM, Juan M Lorenzo <[email protected]> wrote: >>> >>> Dear All, >>> >>> I am using the power of piddles to read and manipulate data but I want >>> to display images in >>> >>> PerlTk. Currently I generate images on the PNG device and later, read >>> them in via a PerlTk module for display. >>> >>> Is there a way to access the png file in memory ( e.g. as a virtual Perl >>> filehandle in RAM) before it is written to disk? >>> >>> Currently I have a working flow that allows me to display the final >>> image in PerlTk Canvas, but I would >>> >>> like to redisplay new calculations conducted within PDL is a faster manner. >>> >>> I have read through the PLplot subroutines and have not found a solution. >>> >>> I have considered the 'mem' device in PDL. Perhaps I can manipulate a >>> buffered piddle in 'mem' into an image format >>> >>> readable by directly in Tk? >>> >>> Does anyone have any suggestions, other than reverting to Prima, or not >>> using PerlTk for interactive GUIs? >>> >>> If you wish I can send you my code. >>> >>> >>> Best Regards, >>> >>> gllore >>> >>> >>> _______________________________________________ >>> pdl-general mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/pdl-general >>> >> >> >> _______________________________________________ >> pdl-general mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/pdl-general > > > _______________________________________________ > pdl-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pdl-general _______________________________________________ pdl-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pdl-general
