Index: trunk/stac/src/stacTransform.c
===================================================================
--- trunk/stac/src/stacTransform.c	(revision 3387)
+++ trunk/stac/src/stacTransform.c	(revision 3610)
@@ -113,4 +113,6 @@
 		   const psArray *masks, // Masks of input images
 		   const psImage *region, // Region of interest for transformation
+		   const psVector *scales, // Relative scales
+		   const psVector *offsets, // Relative offsets
 		   const stacConfig *config // Configuration
     )
@@ -123,4 +125,8 @@
     assert(images->n == maps->n);
     assert(!errors || (images->n == errors->n));
+    assert(!scales || scales->n == images->n);
+    assert(!offsets || offsets->n == images->n);
+    assert(!scales || scales->type.type == PS_TYPE_F32);
+    assert(!offsets || offsets->type.type == PS_TYPE_F32);
 
     // Allocate the output images if required, otherwise check the number
@@ -170,4 +176,12 @@
 	psImage *outImage = (*outputs)->data[n]; // The output image
 	psImage *outError = (*outErrors)->data[n]; // The output error image
+	float offset = 0.0;		// Relative offset
+	float scale = 1.0;		// Relative scale
+	if (offsets) {
+	    offset = offsets->data.F32[n];
+	}
+	if (scales) {
+	    scale = scales->data.F32[n];
+	}
 
 #if 0
@@ -206,4 +220,8 @@
 											    detector->y,
 											    mask, 1, 0.0);
+
+		    outImage->data.F32[y][x] = (outImage->data.F32[y][x] - offset) / scale;
+		    outImage->data.F32[y][x] = outImage->data.F32[y][x] / SQUARE(scale);
+
 		} // Pixels of interest
 
