Texture Quality

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Texture Quality

Post by joleenf »

Hi,

Is there some way to change texture quality from a script? This is especially important for making quality globe view products.

Joleen
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: Texture Quality

Post by bobc »

Hi Joleen -

You can set the texture quality of a layer by using setTextureQuality(). For example:

Code: Select all

addeParms = dict(
    server='adde.ucar.edu',
    dataset='RTIMAGES',
    descriptor='GE-VIS',
    size='ALL',
    )
metadata,data=getADDEImage(**addeParms)
panel=buildWindow()
layer=panel[0].createLayer('Image Display',data)
panel[0].setProjection('World')

From here, you can see the 'torn' edges in the upper corners from the reprojection of the display. This can be fixed by increasing the texture quality.

To see what the current value for texture quality is, you can run:

Code: Select all

print layer.getTextureQuality()

To set the texture quality to high, you can run:

Code: Select all

layer.setTextureQuality(1)

A texture quality of 1 is High, and anything greater than 1 decreases the texture quality. As a note, I found this in the McIDAS-V Java Docs:
Class ImagePlanViewControl
setTextureQuality

While this improves the texture quality of the display, it does not actually change the Texture Quality slider in the Layer Controls. Please let me know if you have any questions.

Thanks -
Bob Carp
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: Texture Quality

Post by joleenf »

Bob,

What is the unit from high to low? The method does not accept float values, is this in percentage?

Joleen
User avatar
mhiley
Posts: 90
Joined: Mon Jan 23, 2012 10:22 pm

Re: Texture Quality

Post by mhiley »

Hi Joleen,

I don't have any satisfying answer for what the units/meaning of the texture quality setting is, but I can tell you that for the Texture Quality slider in the "Layer Controls" tab:

"High" corresponds to 1
"Medium" corresponds to 10
"Low" corresponds to 21

Source: https://github.com/Unidata/IDV/blob/mas ... java#L7707

-Mike
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: Texture Quality

Post by joleenf »

Okay, thanks for the information.
Joleen
Post Reply