I've been trying to measure the total area of a given raster from a clipped geometry (specifically a selected county), and I've been thinking that ImageServiceMeasureTask is what I need to use.
var imageMeasureTask = new ImageServiceMeasureTask(rasterURL);
imageServiceMeasureParams = new ImageServiceMeasureParameters();
imageServiceMeasureParams.fromGeometry = evt.graphic.geometry;
imageMeasureTask.execute(imageServiceMeasureParams, success, failure);