// closure-sis.c        Section: 3.8
//      Copyright 1994, Center for Computer Vision and Visualization,
//      University of Florida.  All rights reserved.
// Closure generator for the simple image statisic algorithm.
//

#include "sis.h"

void rpt_sis( float fmin, float ftau, float fmax ) {

    cerr << "Image minimum: " << fmin << "\t"
	 << "SIS Threshold: " << ftau << "\t"
	 << "maximum: " << fmax << endl;
}


int main() {

    IA_Image<IA_Point<int>,u_char>
	a = IA_Image<IA_Point<int>,u_char>::read_PGM(cin);

    u_char amin( min(a) ), amax( max(a) );

    rpt_sis( amin, sis_threshold(a), amax );
    rpt_sis( amin, sis_threshold( IA_Image<IA_Point<int>,int>(a) ), amax );
    rpt_sis( amin, sis_threshold( IA_Image<IA_Point<int>,float>(a) ), amax );

    exit( 0 );
}
