imglib / imglib2-ij

Translation between ImgLib & ImageJ data structures (both 1.x and 2)
Other
4 stars 8 forks source link

Fix cropping for wrapped images #19

Closed maarzt closed 6 years ago

maarzt commented 6 years ago

Within the legacy user interface ij.plugin.Resizer is used to crop an image. This currently produces wrap results. This PR adds a functional implementation of AbstractVirtualStack#deleteSlice to fix this issue. (Only the deletion of first and last slice is supported currently)

tpietzsch commented 6 years ago

Please fix stuff that I commented.

This PR also adds implementation of setPixels. Could you comment on that? Is this also related to making ij.plugin.Resizer work?

maarzt commented 6 years ago

@tpietzsch Thanks for reviewing this. Looks like I had a bad typing day. I will fix it.

maarzt commented 6 years ago

This PR also adds implementation of setPixels. Could you comment on that? Is this also related to making ij.plugin.Resizer work?

No these changes are not required to make ij.plugin.Resizer work.

In AbstractVirtualStack the setPixels method is now implemented, to make it easier for derived classes to correctly provide the setPixels functionality. It only has an effect, if the derived class implements setPixelsZeroBasedIndex.

The PlanarImgToVirtualStack class now implements exectly this setPixelsZeroBasedIndex method. This is a new feature. I split the PR into two commits such that this becomes more clear.

maarzt commented 6 years ago

@tpietzsch I did all the changes you requested

tpietzsch commented 6 years ago

👍