Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a plug-in for ArcMap that I have been working on. I have my own renderer seperate from ArcMap that I am using to display imagery. My goal is to sync up the display of this imagery with that produced by the renderer that ArcMap is using.

My ideal solution would be to get a copy of the lookup table that Arc is using in displaying the image. I thought this might be buried somewhere in the IRasterStretch interface, particularly in the IRasterStretch2.StretchStats method described here:

IRasterStretch2.StretchStats Description

Unfortunately, I cannot figure out what the method is returning. Basically, I am looking for what "ISomething" should be in the code snippet below:

IRasterStretch2 irs = irrgbr as IRasterStretch2; //irrgbr is of type IRasterRGBRenderer.
IArray ia = irs.StretchStats;
ISomething value = ia.get_Element(0) as ISomething; // What should "ISomething" be?

If anyone has any other ideas on how to go about getting the lookup table and/or statistics that the renderer is using to draw the raster layer, please let me know.

Many thanks!

share|improve this question
What does ia.get_Element(0).GetType().ToString() return? – Kirk Kuykendall Nov 23 '11 at 13:50
It returns "System.__ComObject". I looked in to it a bit and found some examples (not ArcGIS related) where they had the same issue. They got around it by casting to every possible interface and recording when they hit a non-null return. – Patrick Nov 23 '11 at 19:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.