Play with the gui and make sure you're comfortable with navigation/adding/deleting points. (Right click near a selected point to delete it). You can zoom in by drawing a box around an area and zoom out by right click. Pan using the middle mouse button and drag. Mouse scroll to move between frames.
Pay attention to the data that goes in (the shape of it), the pre-populated points (if any), and the resulting points after the UI is closed.
We will now integrate this gui as part of wbi.
Assume the /bsa folder corresponds to the test alignment data folder we have from Junang.
Currently the Experiment class cannot be instantiated unless we have a other-frameSynchronous.txt file, which we don't for the /bsa folder. This is a general problem with all these classes which I'll fix as a separate issue. For now comment out the lines:
e.median_images_himag() will give you M AxB images. For each of these img, img[:img.shape[0]/2, :] are the red channel images, img[img.shape[0]/2:,:] are the green channel images.
e.median_images_lomag() will give you N CxD images.
Take the smaller of M, N and start looking at each of the 2 himag and 1 lomag images in turn. You get min(M,N) x 3 total images.
Bring up the gui as a result of a new wbi align command that you introduce (just the input folder is needed as an argument for now), where you see these 3 images, and can go from 0..min(M,N) time steps, and add points.
Both the Qt* modules can be introduced inside a new wbi.ui module in our code.
You can save the points as a text file for now.
Don't worry about polishing up the UI code - it's not worth the time right now, and we can do that as we go along. So you should not have to change anything in the Qt* modules at all.
The
vb/qt
branch has a scriptscripts/image_align.py
that demonstrates a rough image alignment UI we can use going forward. Mostly thanks to https://github.com/marcel-goldschen-ohm/PyQtImageViewerPlay with the gui and make sure you're comfortable with navigation/adding/deleting points. (Right click near a selected point to delete it). You can zoom in by drawing a box around an area and zoom out by right click. Pan using the middle mouse button and drag. Mouse scroll to move between frames.
Pay attention to the
data
that goes in (the shape of it), the pre-populated points (if any), and the resulting points after the UI is closed.We will now integrate this gui as part of
wbi
.Assume the
/bsa
folder corresponds to the test alignment data folder we have from Junang.Currently the
Experiment
class cannot be instantiated unless we have aother-frameSynchronous.txt
file, which we don't for the/bsa
folder. This is a general problem with all these classes which I'll fix as a separate issue. For now comment out the lines:in the
Experiment
class constructor to proceed.e = Experiment('/bsa')
e.median_images_himag()
will give you M AxB images. For each of theseimg
,img[:img.shape[0]/2, :]
are the red channel images,img[img.shape[0]/2:,:]
are the green channel images.e.median_images_lomag()
will give you N CxD images.Take the smaller of M, N and start looking at each of the 2 himag and 1 lomag images in turn. You get min(M,N) x 3 total images.
Bring up the gui as a result of a new
wbi align
command that you introduce (just the input folder is needed as an argument for now), where you see these 3 images, and can go from 0..min(M,N) time steps, and add points.Both the
Qt*
modules can be introduced inside a newwbi.ui
module in our code. You can save the points as a text file for now.Don't worry about polishing up the UI code - it's not worth the time right now, and we can do that as we go along. So you should not have to change anything in the Qt* modules at all.