region-selector_xuo55Yja.mp4
contrast.mp4
zoom-pan_lrWBI3av.mp4
photo21-2021-09-01-16-09-31_DIgmb4tD.mp4
photo21-2021-09-01-16-10-43_evhoCxYX.mp4
Builds a camera/electrode management DLL to expose to (Python) applications. Includes a GUI application for acquisition and analysis, written in Python.
Uses pyinstaller
. Navigate to the PhotoLib
directory.
Not recommended because start-up is slow, but it is simpler. If you want a single exe for analysis only and portability between folders, shared drivers, machine, etc. For one-file mode:
pyinstaller -F -n pyPhoto21 --add-data nicaiu.dll;. --add-data clseredt.dll;. --add-data ./x64/Release/PhotoLib.dll;./x64/Release/ onefile.py
This will take serveral minutes.
Or in one-folder mode (faster startup, but files are messy):
pyinstaller -n pyPhoto21 --add-data nicaiu.dll;. --add-data clseredt.dll;. driver.py --distpath dist --add-data ./x64/Release/PhotoLib.dll;./x64/Release/
Avoid using the --clean --noconfirm
options.
This will take serveral minutes.
Create a shortcut to the executable in the current directory. Place the shortcut anywhere you like, but do not move any files in the folder in which pyinstaller was run, and do not change the location of the folder either.
If single-file mode, the .exe is ~400 MB, so it will have to be distributed via shared network, Google Drive, USB/external drive, or building locally on destination machine. If single-folder mode, right-click > Send To > Compressed File to zip before distributing. The entire repository folder (PhotoLib), not just the pyinstaller dist path, must be zipped and distributed.
- DLL targets 64-bit machines
- RedshirtImaging's Little Dave (DaVinci 2K)
- NI-USB
- Install NIDAQmx
- Install EDT's PDV driver
- Clone repository.
- Follow the build from source guide below. Or, when/if I've released a stable, standalone version of
PhotoLib.dll
, use that directly (dependencies should come with this repository).
This project is built with Visual Studio Code 2017 or 2019 with the Dynamic Loaded Library (DLL) project template.
- Target x64-Release
- Enable /MT compiler option
- Copy Include Paths from PhotoZ VS setup as needed
- Press F7 to compile and build the DLL
- Use the DLL as a library in any application needed.
- Python: A Python wrapper module using the built-in
ctypes
library is included.
Install the conda environment from environment.yml
:
conda env create --name PhotoLib -f environment.yml
Activate with conda activate PhotoLib
and then run python driver.py
To update environment from changed yml file:
conda env update --name PhotoLib --file environment.yml --prune
Development: if additional conda dependencies are added to the environment, update the environment.yml
with:
conda env export > environment.yml
- Microsoft DUMPBIN tool – A tool to find DLL dependents. From VS Terminal (Developer Powershell) run:
dumpbin /DEPENDENTS .\x64\Release\PhotoLib.dll
Typically:
Image has the following dependencies:
clseredt.dll
nicaiu.dll
KERNEL32.dll
VCOMP140.DLL
Find these dependencies and make sure their directories are included in your system environment's PATH variable or add them to one of the DLL search paths.
- PhotoZ for data acquisition and analysis with GUI entirely in C++
- ZDA_Explorer for flexible data analysis scripting with PhotoZ raw data
- PhotoZ_Images for camera image display
- Cell Detection Kate's SNR clustering method for identifying ROIs