Re: Directory watchdog
Posted by Albert Cardona on Dec 16, 2006; 11:14am
URL: http://imagej.273.s1.nabble.com/Canny-Detector-tp3700799p3700804.html
William's idea is good, but for a final check that the file is complete,
you can make your plugin read the image header. Set your microscope to
acquire as uncompressed tiff ( so the size is predictable) and then
either just use the file size (if all images have the same dimensions)
or read the tiff header for the width and height values. The size of the
image is then the size of the tiff header plus width*height bytes if
8-bit, or width*height*4 if RGB (integers have 4 bytes).
Otherwise set a reasonably long time to wait after the size is not
growing anymore. If the image acquisition is continuous, you can flag an
image as readable if another, newer image has been started to be
recorded in the folder.
Albert