Can't make a simple smooth edge RGB in GUI or script

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

Re: Can't make a simple smooth edge RGB in GUI or script

Post by joleenf »

Thanks Ghansham!

Joleen
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by ghansham »

Hi all

This is the updated jar that takes care of lat/lon mapping problem.

I also forked out RGBCompositeControl and the ImageRGBDisplayable and added the functionality to change texture size.
This texture size adjustment will have an impact when the display is not in data native projection. That is the second image.

Also attached a snapshot of the image where I set the projection to "Asia" and then set the texture quality to high.

May be you may not able to use the RGBControl plugin directly with McV, reason being conflict in class name heirarchy.
You can try it with IDV. Please add the miglayout jars in class path before running IDV.

regards
Ghansham
Attachments
high_quality_texture.jpg
McVRGBEnh.jar
(30.07 KiB) Downloaded 323 times
L1BLLAdapter.jar
(23.91 KiB) Downloaded 317 times
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by bobc »

Hi Ghansham -

Thanks for the plugins. I tried the plugins you sent via email on 11/29 in McIDAS-V and both of them are working. My testing was done with the HS_H08_20160725_0100_LUT_FLDK_ASINH_65_.nc file on Windows 7 64-bit. Here are some comments and notes for each of the plugins:

L1BLLAdapter.jar:
  • The plugin adds a new data source called "LatLonArray Data Source". Load the Himawari NetCDF file with "I'm Feeling Lucky" and this new "LatLonArray Data Source" will be used.
  • Once in the Field Selector, the listing of fields is broken into two categories "FD_LL" and "RGBComposite". The fields under "FD_LL" are the actual variable names (left image below). If the file were loaded with the standard Grid Files data type, the long_name attribute of each variable is listed (right image below). This is probably a matter of personal preference how the fields are listed. Personally, I prefer the seeing the long_name variable attributes listed since they are generally more descriptive but this could be up for debate.
    Field Selector
    Field Selector
  • With the LatLonArray data source, select the 'blue' field and the Imagery display types are available along with gridded displays. With the Grid Files data source, you only have the gridded display types available. Note that with the LatLonArray data source there are no subsetting panels available (no Region or Data Sampling tabs).
  • Create an Image Display of "blue" from the LatLonArray data source and the display looks good. The data displays in a standard satellite projection. If the data were displayed with the Grid Files data source, the display is in a rectilinear projection.
  • Select the "ColorComposite" field and there's a new "RGB Channel Combination" tab in the subset panel of the Field Selector. I noticed that the order is 'blue', 'green', 'red' (image below). I changed the order to be 'red', 'green', 'blue'. Display the data with 'Auto Set Projection' enabled and the display looks good (the edges are smooth).
    RGB Channel Combination default
    RGB Channel Combination default
    rgb.jpg (8.42 KiB) Viewed 2710 times
  • Change the projection to Asia and the edges become somewhat torn... this is to be expected without the McVRGBEnh.jar plugin yet installed.

McVRGBEnh.jar:
  • From the last bullet point above, with this plugin installed there's a new Texture Quality slider available in the Layer Controls. As the slider moves up to 'High' the edges become less jagged.

Additional notes:
  • These plugins were done just as a proof of concept, but I think that adding the ability to subset the data when loaded with the "LatLonArray Data Source" data type would be necessary in the end. I have 16GB memory and setting the texture quality of a ColorComposite layer to High pushes the memory limits.
  • I've tested the new Texture Quality slider with the RGB Composite display type with MSG full disk data and it works there as well which is good.
  • I'd be interested in comments from Joleen/Kaba to see if there are any issues they see outside of what I mentioned since they would be using this in their work.

Thanks again for the plugins, Ghansham!

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

Re: Can't make a simple smooth edge RGB in GUI or script

Post by joleenf »

Hi Bob,

Thank you for the nice summary. I have a few comments to add:

  • The best way to load AHI data is via AHI fixed grid format. It looks like there may be a simple solution to bringing the AHI fixed grid into McIDAS-V.
  • However, we will still encounter lat/lon array files and Ghansham's solution is very nice because it is fast, it provides the high quality image edge needed and gives the user access to texture quality.
  • I like the fact that the red,green,blue selection is in the lower right pane of the field selector. However, I wonder if this would work for cases when the red, green, blue data are coming from different data source files

On both Kaba's and my mac, the red,green,blue selection is hard to read. I am not sure why there is this difference between Mac and windows.
Screen Shot 2016-11-28 at 11.39.44 AM.png
Screen Shot 2016-11-28 at 11.39.44 AM.png (11.46 KiB) Viewed 2704 times


Thanks,
Joleen
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: Can't make a simple smooth edge RGB in GUI or script

Post by ghansham »

Hi all

The UI related issue of RGB selection, I may not be able to reproduce here as I dont have MAC, but I can always provide a simpler default non-colorful labelled interface for combo-boxes. And we can replace the name of datasets with their description as pointed by Bob.
The band selection component is provided for single data source. For multiple datasources, it has to be done using formula. Actually it is a specialization because all the bands are coming from same data source, so to reduce reading of data and number of times user has to select bamds, it is designed in this manner

I am planning to extend original geo-grid data source so that all its functionality is inherited in terms of subsetting and new smoother images are generated.
Regards
Ghansham
Post Reply