Ticket #1273 (closed feature: fixed)
Opened 2012-07-03T14:48:22-05:00
Last modified 2013-06-06T15:42:40-05:00
Add thresholding capabilities
Reported by: | curtis | Owned by: | bdezonia |
---|---|---|---|
Priority: | major | Milestone: |
|
Component: | Core | Version: | |
Severity: | serious | Keywords: | |
Cc: | Blocked By: | #756, #964, #977, #1122 | |
Blocking: |
Description
ImageJ2 needs native support for thresholding, and plugins need to take advantage of it where warranted.
Change History
comment:4 Changed 2012-08-03T13:39:41-05:00 by curtis
- Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta5
comment:5 Changed 2012-09-21T13:41:59-05:00 by curtis
I chatted with bdezonia about the details of how to implement thresholding.
There are several layers we need:
- A ThresholdRegionOfInterest in ImgLib2. Tentatively, it would store a min and max values (of type T) defining the thresholded range, as well as a reference to the actually thresholded interval (a RealRandomAccessibleInterval<T extends Comparable<? super T>>).
- A ThresholdOverlay in ImageJ2. It would of course wrap a ThresholdRegionOfInterest. Unlike other Overlays though, it would need to exist in the entire N-space of its linked data object (the ImgPlus of a particular Dataset? Or the Display itself? Needs further thought; this is very relevant to handling of multiple datasets in a single display: ticket #579).
- A ThresholdAdapter (JHotDrawAdapter implementation) that knows how to generate a JHotDraw Figure from the threshold. Every time the dimensional position changes, the figure needs to be updated. Probably this thresholding should take place on the fly, to avoid a large upfront threshold computation cost. Hopefully the logic for actually constructing a Figure consisting of arbitrary pixels can be reused from other bit-mask-style ROI code (not sure how that currently works though).
We should probably have a ThresholdService to help manage some of this. In particular, it makes sense to maintain only a single ThresholdOverlay at any given time. The Image > Adjust > Threshold command would create/update/delete it as necessary. In this way, the Overlay Manager would display a single entry for the threshold, which would be pretty ideal for manipulating an N-dimensional dataset's threshold easily.
comment:6 Changed 2012-10-10T13:52:03-05:00 by curtis
- Milestone changed from imagej-2.0.0-beta6 to imagej-2.0.0-beta7
comment:8 Changed 2013-01-31T15:37:12-06:00 by bdezonia
Note that I have a functional demo of a threshold overlay and a noninteractive plugin in the sandbox (Threshold Toy) that can adjust such a threshold. This is a proof of concept that uses PointSets. For demo purposes you use a Tool to insert a ThresholdOverlay into an image. The toy-threshold-stuff branch has all the code. It works reasonably well and was quick to implement.
comment:11 Changed 2013-02-11T13:55:04-06:00 by curtis
- Owner changed from curtis to bdezonia
- Status changed from new to assigned
Since bdezonia is doing most of the hard work on this, he should get the credit too.
comment:14 Changed 2013-03-05T16:17:06-06:00 by bdezonia
- Milestone changed from imagej2-b8-analysis to imagej2-b7-ndim-data
comment:19 Changed 2013-06-06T15:42:40-05:00 by bdezonia
- Status changed from assigned to closed
- Resolution set to fixed
All constituent tickets have been resolved for this beta. Closing feature.