fundamental ImageProcessor/ImagePlus misunderstanding

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

fundamental ImageProcessor/ImagePlus misunderstanding

Brian Willkie-2
Hello,

I'm trying to adapt QuickTime_Writer for a stand-alone command-line  
app. I want to load the images from a given directory, process them,  
and build a time-lapse animation from the results. When I try this:

for(...) {
     ...
     ImageProcessor ip = new ColorProcessor(
         GOES.TIFF_WIDTH, GOES.TIFF_HEIGHT);
     ip.setPixels(new ImageReader(fi).readPixels(is));
     ip = ip.convertToByte(true);
     ip.invert();
     ip.setThreshold(thresholdLevel.LOW,
         thresholdLevel.HIGH,
         ij.process.ImageProcessor.RED_LUT);
     stack.addSlice(np.getFileName(), ip);
}
...
writeMovie(...);

The result is a time-lapse movie without any of the processing. I ran  
into similar problems trying to build time-lapse movies of ROI's and  
finally found a solution with ip.fillPolygon(). However in this case,  
I'm not using an ROI, I'm using the entire image. I don't understand  
the process in ImageJ. If I call invert or setThreshold on an  
ImageProcessor, why doesn't it reflect the changes? What do I need to  
do to see those changes in the resulting movie?

Thanks,
Brian