imglib / imglib2

A generic next-generation Java library for image processing
http://imglib2.net/
Other
293 stars 93 forks source link

Improve Point.setPosition #341

Open tpietzsch opened 9 months ago

tpietzsch commented 9 months ago

Point.setPosition(Localizable) should use localize(long[]) instead of going dimension by dimension https://github.com/imglib/imglib2/blob/5b5de3ab206278b83e2cd8749c1bd243b341e905/src/main/java/net/imglib2/Point.java#L159-L164

Remember that Point and Localizable may have different numDimensions(). So think a bit about what is the right thing to do. Also check RealPoint, probably something similar should be done there.