Re: [visad] Transformation and/or resampling

Hi Tom,
Thanks for your suggestion.
The transformation between display and data coordinates is clear and works fine. But if i use the display coordinates for DisplayRendererJ3D.setClip(int plane, boolean enable, float a, float b, float c, float d) method, it does not work like expected. Its not "clipping" on the given display coordinate. (Only clipping on the visad cube for display ccordinates -1.0 to +1.0f is working like expected).

Stefan







On 21.01.2014 15:49, Tom Rink wrote:
Hi Stefan,

If you want to translate between display and data coordinates, look at ScalarMap.getScale() The DisplayRenderer has a method to return the data coordinates of the cursor: getDirectAxisValue() which may be helpful. There are also methods to transform to/from
screen and display coordinates.

Tom

On 1/21/14 4:02 AM, Ghansham Sangar wrote:
Hi Stefan


There is a better solution...

Check flatfield.resample() method.
The flatfield that you extract from fieldimpl, you can call this method for that flatfield.

This method take the domainSet of the target field.


regards
Ghansham



On 01/21/2014 12:30 AM, visad-request@xxxxxxxxxxxxxxxx wrote:
Send visad mailing list submissions to
    visad@xxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
    http://mailman.unidata.ucar.edu/mailman/listinfo/visad
or, via email, send a message with subject or body 'help' to
    visad-request@xxxxxxxxxxxxxxxx

You can reach the person managing the list at
    visad-owner@xxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of visad digest..."


Today's Topics:

    1. Re: Transformation and/or resampling (Stefan Below)


----------------------------------------------------------------------

Message: 1
Date: Mon, 20 Jan 2014 14:23:18 +0100
From: Stefan Below<stefanbelow@xxxxxx>
To: visad@xxxxxxxxxxxxxxxx
Subject: Re: [visad] Transformation and/or resampling
Message-ID:<52DD2346.4030907@xxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi,

thanks for your hint. So i have to iterate over all sequence and check
if there is a point near my coordinate. After that, i have to check
which result is the nearest, right?
Or is there a better solution?

I try to clarify my question:
1b) convet a flat field with the the mathtype
(time->(lat,lon)->temperature) to (lat,lon)->temperature (convert the
data to a linear grid)

2) How can i calculate the clipping parameter? I need a user defined
clipping area. So how can i calculate from an axis value (like x=70) to
the clipping parameter X_POS and/or X_NEG?
dr.setClip(0, true,  1.0f,  0.0f,  0.0f, -1.01f);  // X_POS face
dr.setClip(1, true, -1.0f,  0.0f,  0.0f, -1.01f);  // X_NEG face

Thanks a lot,
Stefan Below




On 18.01.2014 10:29, Ghansham Sangar wrote:
Hi Stefan


Regarding point 1, the visad data object corresponding to the function
type that you mentioned
is a FieldImpl. You can extract the flatfield with the FunctionType
((lat,lon)->Temperature)
by using following FieldImpl method:
data.getSample(0);
It will get you the first flatfield (or let say first image) in the
sequence.

Regarding second one, I am not able to understand the query exactly.


ghansham


On 01/18/2014 12:30 AM, visad-request@xxxxxxxxxxxxxxxx wrote:
Send visad mailing list submissions to
     visad@xxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.unidata.ucar.edu/mailman/listinfo/visad
or, via email, send a message with subject or body 'help' to
     visad-request@xxxxxxxxxxxxxxxx

You can reach the person managing the list at
     visad-owner@xxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of visad digest..."


Today's Topics:

     1. Transformation and/or resampling (Stefan Below)


----------------------------------------------------------------------

Message: 1
Date: Fri, 17 Jan 2014 11:54:08 +0100
From: Stefan Below<stefanbelow@xxxxxx>
To: visad@xxxxxxxxxxxxxxxx
Subject: [visad] Transformation and/or resampling
Message-ID:<52D90BD0.60807@xxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi,

i have some question about data transformation or resampling.

1) I have some data that are defined like this
(time->(lat,lon)->temperature).
           a) Is it possible to transform/resample the data to
(lat,lon)->temperature?
               (The result should be a n x m grid with temperature
values.

           b) I want to get the value information for a specific
coordinate (in  this case lat/lon).
               field.evaluate(LatLonRealtupleType) is not working,
because
of the wrong mathtype.

2) I'am using screenbased axis with TwoDDisplayRendererJ3D . Now i want to set the clipping area to the bounds of the screen based axis. But i
have no clue how to calculate the clipping area. For testing, i tried
to use the cursor position as a clipping boundary.

double[] cursor = getCursor();
float tmpXMAX=(float)cursor[0];
tmpXMAX=1-(tmpXMAX-1);
setClip(0, true, tmpXMAX, 0.0f, 0.0f, -1.0f);

But it is not working as aspected. The boundary is only correct if the cursor is exactly over the right side of the box (cursor position = 1). I think i missed some kind of transformation. Maybe someone can give me
a hint.

Thanks a lot
Stefan Below



------------------------------

_______________________________________________
visad mailing list
visad@xxxxxxxxxxxxxxxx
For list information, to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/

End of visad Digest, Vol 48, Issue 3
************************************

_______________________________________________
visad mailing list
visad@xxxxxxxxxxxxxxxx
For list information, to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/


------------------------------

_______________________________________________
visad mailing list
visad@xxxxxxxxxxxxxxxx
For list information, to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/

End of visad Digest, Vol 48, Issue 5
************************************


_______________________________________________
visad mailing list
visad@xxxxxxxxxxxxxxxx
For list information, to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/

_______________________________________________
visad mailing list
visad@xxxxxxxxxxxxxxxx
For list information, to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/



  • 2014 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: