mosaic dataset gray scale to color

6801
10
04-08-2011 08:03 AM
SteveLi
New Contributor
I am very new to image server.

I created a one band mosaic dataset and published as image service.  When the service is consumed in web client, it shows as gray scale image.

How so I change the color ramp from gray scale to other color?

Thanks.
0 Kudos
10 Replies
PeterBecker
Esri Regular Contributor
It depends on the type of Web client you are using.

If using the REST API then the web application can define a Colormap function to be applied on the server. see Raster Functions under
  http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/index.html

Some web applications based on Flex or Silverlight can apply color maps on images from image services.

If using a more simplistic / generic web app then you will need to apply the color map on the server.
If serving a single image the simplest method is to define the renderer in ArcMap then save it as a Layer (LYR) and publish this Layer as an image service.
If serving a large collection of such imagery create a Mosaic Dataset of them first. There are then two ways to apply the color map. Either as a property of each raster or as a property of the mosaic dataset. If the data is categorical or the color map is to change from image to image it is better to define the color map for each Raster. (See Batch Edit Raster Functions to apply to multiple rasters). If the 1 band images can first be mosaicked and then a the color map applied, it is easier to add the color map function as a property of the mosaic dataset. When using such color maps you should also consider what sampling method and compression to be used to access the data. If using categorical data then set the sampling to nearest and use PNG or LZW compression to access. If the data represents continuous image then use bilinear and JPEG compression for access.
0 Kudos
MichaelParma1
New Contributor III
Peter,
I have a follow up to the first question. When publishing a mosaic dataset to ArcGIS Server, the imagery looks fine down to about 1:40k scale. Beyond that, we just get a gray screen. When bringing the same mosaic dataset directly into ArcMap it appears fine. It is only when consuming the service that we see such behavior (in ArcMap or through an API).

Do you have any suggestions?

Thanks,
Mike
0 Kudos
PeterBecker
Esri Regular Contributor
Gray image are displayed if the server can not access the required images to generate the view. The scale at which this changes is most probably the scale where overviews are displayed. Most common is that the overviews are stored local to the server and can be accessed by the server, but the original images are stored on a SAN/NAS and may not be accessible by the server. Check that the users ArcGISSOC has read access to the original data. This is the user under which the Server tries to access the data. You see the images when directly using the MosaicDataset since you as a user have access.
0 Kudos
MichaelParma1
New Contributor III
Hi, Peter,
Thanks for the info.

I submitted a trouble ticket. It turns out our problem was related to having built our mosaic dataset on ECW files. Due to ER Mapper licensing, this format cannot be published on servers. So, it looks like my Esri overviews were being served but not the underlying ECW files. Thanks to Patrick W. for helping us resolve this issue.

For anyone else interested, there is a enhancement request "NIM031170: Image Server needs to support ECW files". This has initially been rejected by Esri since it results from ER Mapper's licensing but it never hurts to document needs.

Thanks,
Mike
0 Kudos
BillBean
New Contributor III
Using: ArcCatalog 10.02 & ArcServer 10.02

Published: Imagery using a mosaic dataset.

ArcMap will display the imagery correctly, but when viewed as an REST Image service in ArcServer...it will gray out when zoomed in..

We are not using ECW files...we are using MrSID

Any help would be appreciated..

Thanks...
0 Kudos
PeterBecker
Esri Regular Contributor
Are you sure the issue with MrSID is not related to the SOC not having access to data stored on a SAN? Do other formats of imagery stored on the same storage system display?

Concerning reading ECW files on a Server. The issue is not a technical one, but related to licensing. ECW is a proprietary format that can only be read using libraries provided by ERDAS. The libraries to read ECW are restricted by ERDAS and may not be used on server machines, so the libraries are not included with ArcGIS Server distribution. To enable the reading  of ECW files on a server machine, ERDAS have recently created �??ECW for ArcGIS Server�?� that can be purchased from ERDAS and provides a licensing mechanism.
More information on this can be found at
http://www.erdas.com/products/ERDASExtensionsforArcGIS/ECW_for_ArcGIS_Server/Details.aspx

The alternative to for serving is to convert the ECW files into a more open format such as BIG TIF, which can handle very large size and includes a range of different compression formats. For RGB compressed imagery I would recommend Tiled JPEG compression. For the same visual quality the file size of the JPEG compressed TIF files will be about 1.5x larger. JPEG though is very quick to decompress reducing the CPU load on the  server.
0 Kudos
BenKane
New Contributor III
So it is possible to serve a single mosaic dataset in flexviewer, each raster in the dataset with different colormaps, and also to change the colormaps on the fly - for example by accessing a date field.  I am trying to serve one image of thirteen rasters and then attribute different colormaps on different days...any guidance would be very helpful.

Additionally, I have had success applying a colormap via the mosaic dataset properties function chain in ArcCatalog, as well as through the footprint attribute table to individual rasters in ArcMap, but I am suddenly getting an error when trying either method, even on Mosaic Datasets that I have previously had success.  It won't even accept a grayscale or any of the other default colormap options.  Error reads:

The function could not be inserted.  The input or output arguments are invalid.

Anybody have experience with or guidance about this error?

It depends on the type of Web client you are using.

If using the REST API then the web application can define a Colormap function to be applied on the server. see Raster Functions under
  http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/index.html

Some web applications based on Flex or Silverlight can apply color maps on images from image services.

If using a more simplistic / generic web app then you will need to apply the color map on the server.
If serving a single image the simplest method is to define the renderer in ArcMap then save it as a Layer (LYR) and publish this Layer as an image service.
If serving a large collection of such imagery create a Mosaic Dataset of them first. There are then two ways to apply the color map. Either as a property of each raster or as a property of the mosaic dataset. If the data is categorical or the color map is to change from image to image it is better to define the color map for each Raster. (See Batch Edit Raster Functions to apply to multiple rasters). If the 1 band images can first be mosaicked and then a the color map applied, it is easier to add the color map function as a property of the mosaic dataset. When using such color maps you should also consider what sampling method and compression to be used to access the data. If using categorical data then set the sampling to nearest and use PNG or LZW compression to access. If the data represents continuous image then use bilinear and JPEG compression for access.
AnnaReusch
New Contributor

I have the same problem: I can not use the Colourmap Function. It's always the error message saying: "the function could not be inserted.The input or output arguments are invalid." Can anybody help me with this? Thank you!

0 Kudos
KathrynSmith
New Contributor II
I am having a similar problem... I have an image mosaic web service of geotiffs (32-bit float continuous 1-band data). I have a client who wants to consume using a open source web service using the WMS. This provides them with a gray-scale image and they want to serve it as a stretched color ramp. Is a way of configuring the WMS to serve the data with a set color ramp rather than grey-scale? I tried creating an .msd and serving it as a map server instead of image and it handles the mosaic footprint and boundary, but does not like the image data of the mosaic. I found some instructions in the 10.1 help on using SLD with WMS, but we are still using version 10.0 (it'll be at least a year before we upgrade) so it does not look like I can package it this way (I'm not sure I could figure out how to write the SLD XML code anyway).

Any suggestions appreciated.
0 Kudos