image service changing statistics

06-23-2010 11:26 AM
Labels (1)
New Contributor
I have an image with statistics for 3 bands. The maximum values for each band are 191, 197, and 179. When I create an image service definition file, the statistics change to maximum 255. This is corrupting the look of the image. Is there any way I can edit/set/force the statistics to be what I want them to be, the original values...

0 Kudos
2 Replies
Esri Regular Contributor
This is an issue that affects a number of users. When ArcMap opens a raster that contains stats it by default applied a 2StdDev stretch. This can be turned off in the ArcMap 'Tools,Option,Raster, Display rasters with contrast stretching' option. This though is only for one machine. When you do a build with compute output properties on an ISDef, the stats for the service get created and so by default when the services is added to ArcMap is applies a stretch. There does not exist a specific tool to remove the stats from a service. The simplest method is to open the xxx.ISDef/ImageService.ISDef file with a text editor. Find and delete the node called <Bands> IE the section
<Alias>Histogram Generation for ImageService</Alias>
You can also manually edit the values to specific values if that is requrired/
You will need to recompile the service. No need to build anything.
Do not run the Build with the "Compute output properties" else the stats will be regenerated.
In V10 this is resolved by a Mosaic Dataset having a specific property "Is Preprocessed Data" that when set to Yes results in no stretch being applied when added to ArcMap.
0 Kudos
New Contributor
Thanks for the input. In the end, I had to go in and manually change the specific values to have the display be the same. Worked just fine.

0 Kudos