Ticket #235 (closed task: fixed)
Opened 2010-10-04T09:20:42-05:00
Last modified 2012-02-24T14:36:07-06:00
Propagate change to ImageStack::getImageArray() throughout IJ
Reported by: | bdezonia | Owned by: | bdezonia |
---|---|---|---|
Priority: | major | Milestone: |
|
Component: | Core | Version: | |
Severity: | serious | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #1014 |
Description
ImageStack::getImageArray() used to return a reference to its internals for other code to use to manipulate its guts. Its now been changed to return a copy of the stack (though each plane is an actual reference to pixel data). However some users of this method manipulate the stack entries themselves and not the pixel data. They will now be broken. Go through existing code, take existing code and make it methods in PlaneStack and replace inline code with calls to PlaneStack/ImageStack.
Change History
comment:2 Changed 2010-10-15T16:48:52-05:00 by bdezonia
Alternatively Curtis discussed the ability to return a reference to the actual plane array so that the old methods can be supported when planar access is true. Maybe punt this to Curtis?
Reenable TODO tests in ImagePlusTest to recrate problems.
comment:3 Changed 2011-01-05T12:49:10-06:00 by bdezonia
Improved BridgeStack:getImageArray() implementation to act more like IJ 1.x ImageStack in regards to this method. Still it cannot support the ability to get reference to array of slice pointers and then actually reorder them or set the plane references to new values etc. I checked IJ 1.x source and this is not used that way. Can't speak about plugins though. There are a couple classes in IJA that use it this way so any code we adapt will need to be carefully ported.
comment:4 Changed 2011-02-24T14:20:36-06:00 by bdezonia
- Milestone changed from biweekly-2011: Feb-14 to Feb-25 to imagej-2.0-release
This ticket left open so that we make sure to support getImageArray() correctly if we ever override ImageSTack within our legacy layer.
comment:5 Changed 2011-05-19T13:50:45-05:00 by bdezonia
- Status changed from accepted to closed
- Resolution set to fixed
- Milestone changed from imagej-2.0-final to biweekly-2011: May-09 to May-20
Recently made the DatasetHarmonizer reset plane references in a Dataset that is tied to an ImagePlus. Plugin users should be able to manipulate slice order of a stack and see those changes reflected in a Dataset.