PYME.recipes.processing module

Created on Mon May 25 17:15:01 2015

@author: david

class PYME.recipes.processing.BinaryDilation(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
class PYME.recipes.processing.BinaryErosion(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
class PYME.recipes.processing.BinaryFillHoles(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
class PYME.recipes.processing.CaWave(wavefronts, intensity, trange, recipe='')

Bases: object

Attributes

direction_data
direction_plot
end_frame
start_frame
velocity_data
velocity_image
velocity_plot
wavefront_image
default_recipe = "\n - processing.OpticalFlow:\n filterRadius: 10.0\n inputName: intensity\n outputNameX: flow_x\n outputNameY: flow_y\n regularizationLambda: 0.1\n supportRadius: 30.0\n - filters.GaussianFilter:\n inputName: flow_x\n outputName: flow_xf\n processFramesIndividually: false\n sigmaX: 1.0\n sigmaY: 1.0\n sigmaZ: 5.0\n - filters.GaussianFilter:\n inputName: flow_y\n outputName: flow_yf\n processFramesIndividually: false\n sigmaX: 1.0\n sigmaY: 1.0\n sigmaZ: 5.0\n - processing.WavefrontVelocity:\n inputFlowX: flow_xf\n inputFlowY: flow_yf\n inputWavefronts: wavefronts\n outputName: wavefront_velocities\n timeWindow: 5\n - measurement.ImageHistogram:\n inputImage: wavefront_velocities\n inputMask: wavefronts\n left: 0.0\n nbins: 50\n outputName: velocity_histogram\n right: 16.0\n normalize: True\n - processing.VectorfieldAngle:\n inputX: flow_xf\n inputY: flow_yf\n inputZ: ''\n outputPhi: phi\n outputTheta: theta\n - measurement.ImageHistogram:\n inputImage: theta\n inputMask: wavefronts\n left: -3.15\n nbins: 120\n outputName: angle_hist\n right: 3.15\n normalize: True\n "
direction_data
direction_plot
end_frame
start_frame
velocity_data
velocity_image
velocity_plot
wavefront_image
class PYME.recipes.processing.Deconvolve(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

GetDec(dp, vshint) Get a (potentially cached) deconvolution object
GetPSF(vshint)
applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
default_traits_view()
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
GetDec(dp, vshint)

Get a (potentially cached) deconvolution object

GetPSF(vshint)
applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
default_traits_view()
class PYME.recipes.processing.DeconvolveMotionCompensating(parent=None, **kwargs)

Bases: PYME.recipes.processing.Deconvolve

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

GetDec(dp, vshint) Get a (potentially cached) deconvolution object
GetPSF(vshint)
applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
default_traits_view()
execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
GetDec(dp, vshint)

Get a (potentially cached) deconvolution object

applyFilter(data, chanNum, frNum, im)
default_traits_view()
execute(namespace)
class PYME.recipes.processing.DirectionToMask3D(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Estimates the direction from a pixel to the edge of a mask.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

calc_grad(data, chanNum)
execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
calc_grad(data, chanNum)
execute(namespace)
class PYME.recipes.processing.DistanceTransform(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
class PYME.recipes.processing.FindCaWaves(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Finds contiguous calcium wave events from detected wavefronts.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
execute(namespace)
class PYME.recipes.processing.FlatfiledAndDarkCorrect(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
execute(namespace)
class PYME.recipes.processing.FractionalThreshold(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Chose a threshold such that the given fraction of the total labelling is included in the mask.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
class PYME.recipes.processing.Gradient2D(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

calc_grad(data, chanNum)
execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
calc_grad(data, chanNum)
execute(namespace)
class PYME.recipes.processing.Gradient3D(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

calc_grad(data, chanNum)
execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
calc_grad(data, chanNum)
execute(namespace)
class PYME.recipes.processing.GreyDilation(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
class PYME.recipes.processing.GreyErosion(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
class PYME.recipes.processing.Label(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Asigns a unique integer label to each contiguous region in the input mask. Optionally throws away all regions which are smaller than a cutoff size.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
class PYME.recipes.processing.LocalMaxima(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
class PYME.recipes.processing.OpticalFlow(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

calc_flow(data, chanNum)
calc_flow_mp(data, chanNum)
completeMetadata(im)
execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
calc_flow(data, chanNum)
calc_flow_mp(data, chanNum)
completeMetadata(im)
execute(namespace)
class PYME.recipes.processing.ProjectOnVector(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Project onto a set of direction vectors, producing p and s components

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

calc_proj(inpX, inpY, dirX, dirY, chanNum)
do_proj(inpX, inpY, dirX, dirY) project onto basis vectors
execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
calc_proj(inpX, inpY, dirX, dirY, chanNum)
do_proj(inpX, inpY, dirX, dirY)

project onto basis vectors

execute(namespace)
class PYME.recipes.processing.SelectLabel(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Creates a mask corresponding to all pixels with the given label

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
class PYME.recipes.processing.SimpleThreshold(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)
completeMetadata(im)
class PYME.recipes.processing.VectorfieldAngle(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Calculates the angle of a vector field.

Theta is the angle in the x-y plane, and phi is the dip angle

Notes

returns .. math:

sqrt(x*x + y*y + z*z)

Also works for 2D vector fields if inputZ is an empty string.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
execute(namespace)
class PYME.recipes.processing.VectorfieldCurl(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Calculates the curl of a vector field defined by three inputs.

rac{del F_z}{del y} - rac{del F_y}{del z}, rac{del F_x}{del z} - rac{del F_z}{del x}, rac{del F_y}{del x} - rac{del F_x}{del y})$$

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
execute(namespace)
class PYME.recipes.processing.VectorfieldNorm(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Calculates the norm of a vector field defined by three inputs.

Notes

returns .. math:

sqrt(x*x + y*y + z*z)

Also works for 2D vector fields if inputZ is an empty string.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
execute(namespace)
class PYME.recipes.processing.Watershed(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Module with one image input and one image output

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(image, markers[, mask])
execute(namespace)
filter(image, markers[, mask])
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(image, markers, mask=None)
execute(namespace)
filter(image, markers, mask=None)
class PYME.recipes.processing.WavefrontDetection(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Detect Ca2+ wavefronts by looking at the difference images between two consecutive frames.

Wavefront position corresponds to the position of the transient maximum (i.e. the zero-crossing in the temporal derivative), detected by finding all pixels where the magnitude of the temporal derivative is less than gradientThreshold. An intensity threshold is also used to reject areas of the image where temporal changes are due to noise alone.

Works best on low-pass filtered data.

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
execute(namespace)
class PYME.recipes.processing.WavefrontVelocity(parent=None, **kwargs)

Bases: PYME.recipes.base.ModuleBase

Calculates wavefront velocity given a wavefront image and optic flow images

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

execute(namespace)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
execute(namespace)
class PYME.recipes.processing.WhiteTophat(parent=None, **kwargs)

Bases: PYME.recipes.base.Filter

Attributes

default_view
hide_in_overview
inputs
outputs
pipeline_view
pipeline_view_min

Methods

applyFilter(data, chanNum, frNum, im)
trait_items_event(event_trait,name,items_event)
trait_property_changed(...)
traits_init()
traits_inited([True])
applyFilter(data, chanNum, frNum, im)