Ticket #1128 (closed task: fixed)

Opened 7 years ago

Last modified 6 years ago

Unify ImgLib2 Histogram implementations

Reported by: curtis Owned by: aivar
Priority: critical Milestone: imagej2-b7-ndim-data
Component: ImgLib2 Version: 2.0.0-beta1
Severity: serious Keywords:
Cc: christian.dietz@…, Martin.Horn@… Blocked By:
Blocking: #1398


There are currently multiple implementations of a histogram throughout ImgLib2 and KNIP. There is  one in net.imglib2.algorithm.stats, as well as another in [net.imglib2.script.analysis].

We need to fix up the net.imglib2.algorithm.stats.Histogram implementation to be flexible enough to cover all use cases. For example, it needs to support using any Iterable<T> rather than only Img<T> or RealCursor<T>.

Change History

comment:1 Changed 7 years ago by curtis

  • Blocking 1203 added

comment:2 Changed 7 years ago by curtis

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta4

comment:3 Changed 7 years ago by curtis

  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta5

comment:4 Changed 7 years ago by bdezonia

Note that there is a Histogram2D class in imglib2 OPS

Last edited 7 years ago by bdezonia (previous) (diff)

comment:5 Changed 7 years ago by aivar

  • Owner changed from curtis to aivar
  • Status changed from new to assigned

These histogram implementations mix the basic idea of making a histogram with a means of traversing the image.

The core value to histogram bin assignment should be refactored to use the new Binning class:


Unfortunately the extant histogram variants involve a pass through the image. This is not very efficient if you want to find the image minimum and maximum and then build a histogram of values in that range. I added a ticket #1384.

comment:6 Changed 7 years ago by aivar

  • Blocked By 1384 added

comment:7 Changed 7 years ago by bdezonia

Christian mentioned that there is also an OpsHistogram class in imglib2 OPS.

comment:8 Changed 7 years ago by curtis

  • Milestone changed from imagej-2.0.0-beta6 to imagej-2.0.0-beta7

comment:9 Changed 7 years ago by bdezonia

  • Blocking 1398 added; 1203 removed
  • Blocked By 1384 removed

I have been doing some work on this for our most recent beta on imglib's histogram-stuff branch. Soon I'll share with others and solicit feedback.

comment:10 Changed 7 years ago by bdezonia

  • Milestone changed from imagej2-b8-analysis to imagej2-b7-ndim-data

comment:11 Changed 6 years ago by bdezonia

  • Status changed from assigned to closed
  • Resolution set to fixed

The histogram changes I made are in Imglib's master branch in the Imglib2 algorithms subproject in the histogram subpackage. Further work is needed by users of Imglib to utilize the new histogram classes. Clsogin this ticket.

Note: See TracTickets for help on using tickets.