Implementation of OpenCV + reorganisation of SubframeExperiment
In this MR I have added OpenCV as a dependecy to do image processing when we are not trying to construct a full 3D model in the peak finding stage. This is particularly important for the strategy tool (#187), which requires autoindexing from a single frame, which is impossible in the current framework.
The changes are as follows:
- Reorganisation of the left widget of
SubframeExperimentto have three tabs: i) strategy ii) histogram iii) masks. This has allowed... - Elimination of the interaction mode combo of
DetectorWidget, which provided a method of changing the mode that I think was inconsistent and incomprehensible to the user. - Addition of a new core module,
PeakFinder2Dthat leverages OpenCV as an external library - Addition of a
DataSetmetadata entry,bitDepth, which is required in many OpenCV operations. This may break compatibility with older.ohklfiles. - Changed the plot widget of
SubframeExperimentto have a tab that displays autoindexer solutions. - Added a table interface enabling mask dimensions to be modified from the GUI using spin boxes (
SubframeExperimentmasks tab) - Replaced interaction mode combo with two mutually exclusive
QPushButtons to allow the zoom and rectangle select functionality inDetectorScene
From now, the mask functionality is only accessible from SubframeExperiment, although they can be seen in other widgets. The user can find blobs in any single detector image using the new strategy tab in SubframeExperiment, and attempt to autoindex using this frame only. Before attempting this, it is crucial to i) adjust the direct beam position and ii) apply masks. Note that the masking is much more critical than it is for the regular PeakFinder because the current blob-finding implementation is less discerning of heterogeneous features, and blobs will not be filtered by d-range, strength etc because it is impossible to integrate them at this point.
Fixes #538 (closed), #537 (closed), #478 (closed), #255 (closed) and #168 (closed),