Dear ImageJ listers,
I have recently come across a problem in the "Analyse Particles" function which I think might be a bug in handling of hyperstacks or ROI position handling. I analyse a thresholded timeseries (Z + T) and add identified particles to the ROI manager. I should note that I get the time series by the "Duplicate" command from a composite image. At the first timepoint, ROIs are added to the ROI manager for each for each of the Z-Planes. However, problems start to occur once the stack reaches the last z-plane of timepoint 1. I would expect that now the ROIs from timepoint 2 should be added to the manager. However, when reaching the end of the Z-Stack of timepoint 1, the ROI positions jump not to timepoint 2, but rather to the next timepoint that would come after the Z-Stack, e.g. if the z-stack has 5 planes, the next added ROIs will be localized to Timepoint 6, Z-Position 5. After this, the ROI-Positions will cycle not through the Z-planes, but rather through the time-axis until the end is reached. After this, the time-axis to a later timepoint (in the case of the "Mitosis 5D" sample timeseries to timepoint 11) and from there on behaves as expected, e.g. ROIs are added first to z-planes and when the last-Z-plane is reached, ROIs will be added to the first Z-plane of the next timepoint.. I do not think that the problem is with the definition of the ROIs as such, since the shape of the ROIs corresponds to the segmented particles at the expected timepoints. I rather think that wrong position info is written to the ROIs when adding them to the ROI manager. The problem occurs both in FIJI and in plain ImageJ, both in a current version and in the FIJI lifeline version. I use Windows 7 64bit version, and run ImageJ / Fiji in 64 bit. However, I have tested the plain ImageJ 32 bit version and find the same behaviour. I have attached a minimal macro (see below) that calls the "Mitosis" sample, extracts the first channel, applies a threshold and then runs the Particle analyser which adds the ROIs to the manager. Then the positions of the ROIs in question are printed to the log in order to illustrate the problem. Thanks a lot for your help Kay // Begin sample macro run("Mitosis (26MB, 5D stack)"); run("Duplicate...", "duplicate channels=1"); //run("Threshold..."); setAutoThreshold("Triangle dark"); setOption("BlackBackground", true); run("Convert to Mask", "method=Triangle background=Dark black"); run("Analyze Particles...", "size=1-Infinity add stack"); // Printing of the ROI positions to the log, not necessary for bug roiManager("Select", 0); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); roiManager("Select", 1); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); roiManager("Select", 2); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); roiManager("Select", 3); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); roiManager("Select", 4); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); //normal behaviour until here, then the "Frame" position jumps not to Frame "2" but to Frame 6 (continues from the "Z" position). roiManager("Select", 5); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); roiManager("Select", 6); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); //end of the Timeseries for Z=5 reached, jumps to T=11 and Z=1 roiManager("Select", 51); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); roiManager("Select", 52); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); roiManager("Select", 53); Stack.getPosition(channel, slice, frame); print("Position (C, Z, T): "+channel+", "+slice+", "+frame); -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |