Ticket #845 (closed defect: moved)
Opened 2011-10-25T16:37:57-05:00
Last modified 2014-08-13T16:53:57-05:00
Break IJ2's reliance on RealType
Reported by: | bdezonia | Owned by: | curtis |
---|---|---|---|
Priority: | major | Milestone: | imagej-2.5.0 |
Component: | Data Model | Version: | |
Severity: | serious | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
IJ2 has much code that relies on RealType. Starting with ImglibDataset there are numerous assumptions of data type made. ImgOpener however just returns an Img<?>. So ideally we could pass that to ImglibDataset without an unsafe cast. Remove reliance on RealType if possible. This issue likely goes very deep.
Change History
comment:1 Changed 2013-07-16T14:33:14-05:00 by bdezonia
comment:2 Changed 2013-07-29T11:16:11-05:00 by bdezonia
Rather than the TypedDataset approach I have instead created a ImgPlusService that strengthens typing of arbitrary ImgPlus data. It has been merged to master with commit be9c777fcec78e992b6a15585acdd6b04be754e0.
To do is to make Dataset's ImgPlus be derived from Type rather than RealType.
comment:3 Changed 2014-08-13T16:53:57-05:00 by curtis
- Status changed from new to closed
- Resolution set to moved
This ticket description is very old and slightly obsolete. But there is a need to make Dataset derive from NumericType rather than RealType. RealType does not work safely for LongType. Nor any future types (like BigDecimal backed).
The DataType interface was put in place to manage newer types. At a similar time I added to the data-types branch a TypedDataset class that allows one to take a Dataset and pull out various typed ImgPluses (like of ComplexType, or IntegerType, etc.). This class could be used to make Dataset more generally typed and yet allow plugins to get very specific types in order to use the most specific operations for the type. This TypedDataset has not yet been merged to master. Hoping for feedback.