This repo contains all draft Qt GUI code for CellTrack
-
Install
K-Lite_Codec
: Since the player in the app does not contain a decoder, you may have to installK-Lite_Codec
.` It is probably not necessary, if you already have other decoder on your computer.K-Lite_Codec_Pack_1508_Basic.exe
has been included in releaseothers.zip
. Note that for installation preference you need to chooseMovies & TV app
. The image,intstallNote.PNG
, shows this in releaseothers.zip
. -
Install
python 3.7
: Downloadpython 3.7
installer from www.python.org based on your computer system. On Windows, make sure that you selectAdd to PATH
andDisable path length limit
. After installation, please reboot the computer. -
Install
opencv-python
,scipy
andscikit-image
package In terminal, use commandpip3 install opencv-python
,pip3 install scipy
andpip3 install scikit-image
There are serveral assumptions about what you have:
1. A python script
2. Serval parameters that you want to pass it to your python script.
3. Use print()
function to return results. (The app reads results line by line.)
In following paragraphs, above assumptions are explained in order.
- A python script : The python environment is based on the system python 3 environment. Therefore, please install the opencv or other packages in system level.
- Serval parameters that you want to pass it to your python script:
The good thing about this GUI is that you can customize the parameters that you want to pass.
In the
userData.json
, define your parameters ( or parameter set) in theTemplate
Object with type string or double. Later you can instance the parameter set for each video as an object inHiddenVariable
array. Here is an example.
Assume you want to pass maxSize
and minSize
to your python script.
For step 1, you define
"Template": {
"filename": "",
"maxSize": 0,
"minSize": 0
}
For step 2, you instance the template for a specific video, cycto.avi
and v.avi
.
"HiddenVariable": [
{
"filename": "cycto.avi",
"maxSize": 100,
"minSize": 100.1
},
{
"filename": "v.avi",
"maxSize": 2.2222,
"minSize": 100.14444
}
]
For step 3, you load video in the GUI, choose your script and click start analysis. Later, you see the return result from Log Tab.
The command that the GUI execute: python yourScript.py videoPath videoName "Here are your customized parameters"
Hint: test.py
has been provided in release others.zip
- The types in the
Template
are limited tostring
anddouble
. Template
has to havefilename
defined in it, since the GUI uses the file name to match videos and corresponding param.- Kind reminder: careful with comma symbol in json file. The last object doesn't have comma at the end.
- It is recommanded you modify the
userData.json
in folder instead of creating a new one. - Use
print()
function to return results. (The app reads results line by line): Making sure the first thing you print is the full path for result video. The GUI checks that file and loads it into the player. Other results are read and printed line by line in Log Tab.