Index: trunk/stac/src/stac.h
===================================================================
--- trunk/stac/src/stac.h	(revision 2670)
+++ trunk/stac/src/stac.h	(revision 2764)
@@ -137,12 +137,29 @@
 // Transform the rejection masks back to the source frame
 psArray *stacRejection(psArray *inputs,	// Input images
-		       psArray *transformed, // Transformed images
-		       psImage *combined, // Combined image
+		       psArray *rejected, // Rejected images
+		       psArray *regions, // Regions of interest
 		       psArray *maps,	// Maps from input to transformed image
 		       psArray *inverseMaps, // Maps from transformed to input image
-		       psArray *rejected, // Rejected images
 		       stacConfig *config // Configuration
     );
 
+/************************************************************************************************************/
+
+// stacAreaOfInterest.c
+
+// Returns the change in x' and y' for a change in x and y of 1
+bool stacPlaneTransformDeriv(psPlane *out, // Output derivative, assumed already allocated
+			     psPlaneTransform *transform, // The transform for which to obtain the derivative
+			     psPlane *in // The position at which to obtain the derivative
+    );
+
+// Return a mask image designating the region of interest in the source frame
+// Basically, uses derivatives of the transformation to work out what pixels in the source might be of interest
+psImage *stacAreaOfInterest(psImage *mask, // Mask that is to be used to determine the area of interest
+			    psPlaneTransform *map, // Map from the mask to the area of interest
+			    int nxOut, int nyOut // Size of the area of interest
+    );
+
+/************************************************************************************************************/
 
 #endif
