itk-vtk-viewer icon indicating copy to clipboard operation
itk-vtk-viewer copied to clipboard

Option for setting the origin

Open oeway opened this issue 4 years ago • 3 comments

Would be nice to have an option to determine the origin, for example, for the ImJoy api.

Currently, the default origin for itk-vtk-viewer located in the lower-left corner, however, for microscopy images, the origin is located in the top-left corner.

oeway avatar Nov 03 '20 23:11 oeway

ITK and ImageJ (I believe) treat the origin in the lower left, but VTK and VTK.js put the origin in the top left corner. We now have a nice axis tools that helps visualize this (works in 2D and 3D):

localhost_8080__fileToLoad=https___kitware github io_itk-vtk-viewer_docs_imjoy png

I could create an ImJoy plugin to flip the data vertically.

thewtex avatar Nov 04 '20 18:11 thewtex

In fact, the origin of imagej is actually top-left-- same as the current version of itk-vtk-viewer FznygvcVRS

I had the impression that itk-vtk-viewer's origin is lower-left, and I checked an old plugin, and it actually located lower left: Screenshot 2020-11-04 at 22 24 26

The plugin is here

What's happening?

oeway avatar Nov 04 '20 21:11 oeway

It could be related to how the data is read in -- e.g. ITK reads JPEGs in the natural (C-order) pixel order, but VTK flips the data in the J direction because of this "upper-left origin" issue. In the above two examples, what is reading in the data from file?

thewtex avatar Nov 05 '20 16:11 thewtex