Skip to main content

Framework to enable acquisition, analysis, visualization of computational microscopy workflows

Project description

recOrder

record Order (recOrder): A framework for live-processing birefringence data

dependencies

  • numpy
  • py4j
  • opencv
  • pyqt5
  • napari
  • ReconstructOrder

pypi install coming soon!

this repo

recOrder is a framework to enable microscopy acquisition, analysis, and visualization pipelines. In particular it is developed to accelerate computational microscopy workflows.

recOrder is an abstraction on top of the pyqt5 backend that simplifies pyqt5's signal/slot mechanism. recOrder enables a traditional 'publish-subscribe' pattern through simple function decorations. It does not use QtDBus, and thus does not require installation of D-bus for your OS.

please see the examples for a sense of how to construct a program. In particular, look at "example_reconstruct_order"

Installation

Create a new conda environment (optional, but recommended)

Install conda package management system by installing anaconda or miniconda (https://conda.io/). Creating a conda environment dedicated to ReconstructOrder will avoid version conflicts among packages required by ReconstructOrder and packages required by other python software.

conda create -n <your-environment-name> python=3.7
conda activate <your-environment-name>

pip install via pypi

(COMING SOON)

Usage

There are three primary modules in this framework

  • acquisition
  • analysis
  • visualization

And one program construction module:

  • program

Acquisition, analysis and visualization contain one base class named
AcquisitionBase,
AnalysisBase,
VisualizationBase, respectively.

Program contains one class that connects any number of the earlier three modules together.

The typical pattern of usage is to define a class that inherits any of the above bases:

class MyTestClass(AcquisitionBase):
      def __init__(self):
             super().__init__()

Next, to have a class's method broadcast or receive on a channel, simply decorate it:

class MyAcquisitionClass(AcquisitionBase):
       def __init__(self):
             super().__init__()

        @AcquisitionBase.emitter(channel=0)
        def broadcast_to_channel():
             pass

         @AcquisitionBase.receiver(channel=1)
         der receive_from_channel(from_signal):
              pass

If you want the same method to both receive and broadcast on a channel, use bidirectional:

class MyVisualizationClass(VisualizeBase):
       def __init__(self):
             super().__init__()

        @VisualizeBase.bidirectional(emitter_channel=1, receiver_channel=0):
         def emit_and_receive_from_channels(from_signal):
             pass

####Note, a method does not need to return a value to emit a signal. However, a method needs to declare parameter in order to receive a signal.

Finally, to build and run an entire program, use the program class:

  acq = MyAcquisitionClass()
  vis = MyVisualizationClass()
  program = Program(acquire=acq, visualize=vis)
  program.build()

Any number of primary modules can be instantiated and passed to the "program" builder: program = Program(acquire=<acquisition_module>, analyze=<analysis_module>, visualize=<visualization_module>) Upon calling "program.build()", signals will be connected and the program is run.

For computational microscopy workflows, there are additionally four datastructures and some microscope control utilities:

Four datastructures:

  • Intensity
  • Stokes
  • Physical
  • Background

LICENSE

Chan Zuckerberg Biohub Software License

This software license is the 2-clause BSD license plus clause a third clause that prohibits redistribution and use for commercial purposes without further permission.

Copyright © 2019. Chan Zuckerberg Biohub. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Redistributions and use for commercial purposes are not permitted without the Chan Zuckerberg Biohub's written permission. For purposes of this license, commercial purposes are the incorporation of the Chan Zuckerberg Biohub's software into anything for which you will charge fees or other compensation or use of the software to perform a commercial service for a third party. Contact ip@czbiohub.org for commercial licensing opportunities.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recOrder_base_test-0.0.1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

recOrder_base_test-0.0.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file recOrder_base_test-0.0.1.tar.gz.

File metadata

  • Download URL: recOrder_base_test-0.0.1.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200102 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

File hashes

Hashes for recOrder_base_test-0.0.1.tar.gz
Algorithm Hash digest
SHA256 79da5e75d18ae36ae008b944dec4db2dd6bb2eb48fb251a2c6fc79af0571a067
MD5 93a167097af1fba8a8b752d3158d40f0
BLAKE2b-256 ce77c8b31a382989a1f20041206ef43704332476e077389902d2db7de639ea70

See more details on using hashes here.

File details

Details for the file recOrder_base_test-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: recOrder_base_test-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200102 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

File hashes

Hashes for recOrder_base_test-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4715069f5037849f9a4db786ac8c6e5a43a57586669ee45debacdcd40d847d3c
MD5 e6dd4e7e7a3e6dd02067bb414f82c7a4
BLAKE2b-256 c5942f8c2315d46989520d4abed6c7d81a88166fa78e0189a618dfbb6c0a8085

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page