Ticket #295 (closed defect: fixed)

Opened 9 years ago

Last modified 7 years ago

Reduce number of classes in ij1-patches

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: biweekly-2010: Dec-13 to Dec-23
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1014

Description

Goal: to use the latest IJ.jar and the minimum number of patched classes in IJ1-bridge. Need to get ij1-patches passing tests with latest IJ.jar. Then replace ij1-patch source tree files with matching source as necessary. Then reimplement our previous patches as needed. Finally get changes to Wayne to incorporate into ImageJ.

Change History

comment:1 Changed 9 years ago by bdezonia

  • Status changed from new to accepted

comment:2 Changed 9 years ago by bdezonia

Compared _ij1-patches to 1.43u source. Found 16 classes that can be eliminated. 20 remain that need changing. Notes so far:

ij

CompositeImage

Looks like I made a static Color.getRGB() thats not needed

ImagePlus

*
I made a couple TODOs to see what the consequences are of this class setting the stack to null when there is one slice
Noted that createHyperStack() cannot be upgraded to handle new processors. Needs to be avoided in IJ2. Need some kind of

ProcessorFactory in IJ1 if we must support the IJ1 functionality.

Added OTHER type

and modified getBitDepth(), getBytesPerPixel(), setType(), a lot in getPixel(), getFileInfo(), getValueAsString(), and copy() : bytes per pix calc

*

VirtualStack

Looks like unneeded changes in regards to a signature for adding unsigned slices and also calling super(0,0) in default constructor.

This last one probably due to a bug I found with tests.

ij.gui

ImageCanvas

*
findColor() (or setDrawingColor()) needs to be extended to ImagePlus.OTHER type images
*

ImageWindow

*
need to get type name of processor rather than switch on ImagePlus type.
also need to calc bytesPerPixel from ip rather than using the ImagePlus type.
*

Line

looks like a code formatting difference - ignore

OvalRoi

a bug fix Wayne has incorporated - ignore

Overlay

looks like a code formatting difference - ignore

PolygonRoi

looks like a code formatting difference - ignore

ShapeRoi

nothing - just Wayne's changes

TextRoi

nothing - just Wayne's changes

Wand

*
needs some changes to accommodate ImgLibProcessors. Wayne uses primitive array access here. replace with ip.getPixelValue() & ip.get()
*

ij.io

FileInfo

*
adding GRAY64_SIGNED. Returning values for these types for bytes per pix and type name I think
*

ImageReader

nothing - just Wayne's changes

ImportDialog

*
added "12-bit Unsigned" as a FileInfo type here. Not sure if I need to make this change or not. And what about other types (8/16/32/64-bit signed)?
I think I made 12 bit code because it looked like it was an oversight that it wasn't there. The new signed types are not automatically supported.
Talk to Wayne about this further.
*

ij.macro

Interpreter

nothing - just Wayne's changes

Variable

nothing - just Wayne's changes

ij.measure

Calibration

*
I defined isSameAs(). Only be used by tests. Need to decide whether to add to IJ1 baseline.
*

CurveFitter

a bug fix Wayne has incorporated - ignore

ResultsTable

nothing - just Wayne's changes

ij.plugin

FolderOpener

*
it does a switch on type to figure bytes per pixel. must incorporate into ImagePlus
*

ListVirtualStack

*
it does a switch on type to figure bytes per pixel. must incorporate into ImagePlus
*

Macro_Runner

my changes can be ignored

ij.plugin.filter

ImageMath

*
incorporate use of isFloatingType() and getf() rather than hardcoded float[] refs and FloatProcessor refs
*

ParticleAnalyzer

*
Need to add OTHER type. Can't really tell what changes of mine were necessary. Check again later.
*

PluginFilterRunner

*
I had added a case for OTHER type and DOES_ALL. Might need something here.
*

ij.plugin.frame

ContrastAdjuster

*
incorporate use of isFloatingType() rather than hardcoded FloatProcessor refs
*

ij.process

BinaryProcessor

a lot of changes but none of them look like mine

ByteProcessor

*
made create8BitImage() protected
I made some sum + 4 code to Wayne's convolve code as one of his bug fixes. He may not have carried it forward.
new methods for bridge support: getBitDepth(), getStats, isXType, min/max allow, type name, setd(), getd()
*

ColorProcessor

*
new methods for bridge support: getBitDepth(), getStats, isXType, min/max allow, type name, setd(), getd()
*

FloatProcessor

*
new methods for bridge support: getBitDepth(), getStats, isXType, min/max allow, type name, setd(), getd()
*

ImageProcessor

*
make a few methods public/protected vs. package:

public getBillnearInterpolatedPixel()
public cubic()
protected resetPixels()
protected create8BitImage()

new methods for bridge support: getBitDepth(), getStats, isXType, min/max allow, type name, setd(), getd()
*

ImageStatistics

*
return ip,getStatistics() rather than per processor type case logic
make a few methods public/protected vs. package:

protected calculateStdDev()
protected setup()
protected fitEllipse()
protected calculateMedian()

*

ShortBlitter

A bug fix I made that Wayne likely incorporated in a version later than 1.43u


ShortProcessor

*
make a few methods public/protected vs. package:

protected create8BitImage()

new methods for bridge support: getBitDepth(), getStats, isXType, min/max allow, type name, setd(), getd()
*


TypeConverter

*
convert OTHER type images to BYTE, Short, and Float
*

comment:3 Changed 9 years ago by bdezonia

Removed obsolete patches (due to Wayne incorporating my bug fixes). Had to comment out a couple tests that no longer passed. Marked them with "reenable". Must revisit to determine if bugs unearthed or if underlying code just changed and tests no longer valid.

comment:4 Changed 9 years ago by bdezonia

also, _ij1-patches pom and ij1-bridge pom updated to use ij 1.44l9 rather than 1.43u.

comment:5 Changed 9 years ago by bdezonia

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

consider this aspect of ij1-patches complete. further needs documented in ticket #305

comment:6 Changed 7 years ago by curtis

  • Blocking 1014 added
Note: See TracTickets for help on using tickets.