Re: slow 2d image generation

Jim:

I believe that part of the slowness in "reading" is that the form of your data is producing an IrregularSet, which VisAD needs to "triagulate" when it does the display. If your data points are a "regular grid" (meaning, regular/constant spacing between data points) you can use the format:

Down_Range[-755.383:-200], Cross_Range[-755.838:-500], RCS

(where the '-200' and '-500' should be the actual ending values for the sample domain. If you do this, and then put all the RCS values (along the Cross_Range)for a single Down_Range on one input line. The text reader will compute the actual domain sampling coordinate for each "RCS" value. When you do this, the TextAdapter will make a Gridded2DSet for the sampling domain, and it is handled faster than the IrregularSet.

Of course, there will be some overhead for reading and decoding the text in either case, so I agree with JimK -- you may want to create your own reader.

tom


v>>>(Down_Range,Cross_Range)->(RCS)         
>>>Down_Range  Cross_Range     RCS
>>>-755.383    -755.383        -124.0984508

Jim Cookas wrote:
jim

i just switched to a DisplayImplJ3D with a TwoDDisplayRendererJ3D...the image 
did not load much faster, but it definitely looked much better (less grainy) 
and the pan/zoom functions were very smooth...basically it solved #2 and #3 
problems from my initial email, but #1 still remains....any ideas on loading 
data into visad more quickly?....the file is only 147k, so it should be quick, 
right?

thanks to jim k for the suggestion!

jc


-----Original Message-----
From: Jim Koutsovasilis [mailto:jimk@xxxxxxxxxx]
Sent: Monday, January 05, 2004 4:46 PM
To: Jim Cookas
Cc: visad@xxxxxxxxxxxxxxxx
Subject: Re: slow 2d image generation


Hello Jim,

if you are using a DisplayImplJ2D display, try a DisplayImplJ3D instead.
It might be faster.

Regards,
Jim.
---
Jim Koutsovasilis
Bureau of Meteorology, Australia
jimk@xxxxxxxxxx

On Mon, Jan 05, 2004 at 04:24:52PM -0600, Jim Cookas wrote:

hello group

first off, many thanks to all who helped with my previous

question regarding constant maps...however, i now have a new problem...

the application i am currently developing with visad has a

feature to load and display 2d image data from an ascii file...i am using the textadapter class to read the file and turn into a flatfield...the ascii file is in the tab-spaced format that the textadapter class can read....here is a snip of the first five lines of an example ascii file:

<snip>
(Down_Range,Cross_Range)->(RCS)              
Down_Range      Cross_Range     RCS
-755.383        -755.383        -124.0984508
-731.684        -755.383        -124.0586397
-707.986        -755.383        -123.995843
-684.288        -755.383        -123.9096856

...and so on
</snip>

in this case, 'down_range' maps to the x-axis,

'cross_range' maps to the y-axis, and 'rcs' maps to an rgb value...everything loads and displays fine, but there are three major problems:

1) loading the data is ___sloooow___...the example file i

snipped above comes to 147515 bytes (256 x 256 image size) and it takes a solid 30 seconds from when the file is opened to when the image is finally displayed...we have c++ code in other applications that loads and displays the same data almost instantly...is it a java problem?...is it visad?...is it something i'm doing wrong?

2) panning and zooming of the image (and line plots for

that matter) are slow and choppy...when data is rendered as points, these functions are very quick, smooth, and acceptable...is there any way to speed up panning/zooming?

3) is there any way to increase the resolution of the image

rendering to make it more 'smooth'?...right now it looks textured...when zoomed in closely, the data points look very triangular...any ideas?

thanks in advance for any help that can be provided...let

me know if you need more information from me...peace!

jc





--
Tom Whittaker
University of Wisconsin-Madison
SSEC/CIMSS