Skip to main content

Segment regions from fluorescence images

Project description

FlourSeg provides such and such and so and so. You might find it most useful for tasks involving <x> and also <y>. Typical usage often looks like this:

#!/usr/bin/env python

from fluorseg import liffile
from fluorseg import roifile

lif = liffile.LIFFile(path)

#show the path
print(lif.path)

#show the metadata xml object
print(lif.xml_root)

#show the number of images in the file
print(lif.img_count)

#show the number of layers in each zstack for each image
print(lif.z_stack_count)

#show the first image's, 2nd zstack layer
print(type(lif.combined_channel_images[0][1]))

#show the type first channel of the first image's 2nd z-stack layer - each data array is a numpy ndarray
# they are held in nested lists => [image index][z_stack index]
print(type(lif.channel_one_images[0][1]))

#plot the second channel of the first image's 1st z-stack layer [image index][z_stack index]
plt.imshow(lif.channel_two_images[0][0], interpolation='nearest')
plt.show()

#get the maximum projection of each images z-stack for each image
max_projs_channel_one = [liffile.max_proj(z_stacks) for z_stacks in lif.channel_one_images]
max_projs_channel_two = [liffile.max_proj(z_stacks) for z_stacks in lif.channel_two_images]

#plot the first max_proj
plt.imshow(max_projs_channel_one[0], interpolation='nearest')
plt.show()

plt.imshow(max_projs_channel_two[0], interpolation='nearest')
plt.show()

#get the region of interest info
roi_info = roifile.ROIFile(roi_zip_path) #roi for series 001 only

#make the mask for the second region of interest - a polygon
mask = make_polygon_mask(roi_info.rois[1], 512, 512)

#make the mask for the 5th region of interest - an ellipse
oval_mask = make_oval_mask(roi_info.rois[4], 512,512)

#just get the volume in a region of interest - masking done for you
series1_mp_c2 = max_projs_channel_two[0]
get_region_volume(series1_mp_c2, roi_info.rois[4])

(Note the double-colon and 4-space indent formatting above.)

Paragraphs are separated by blank lines. Italics, bold, and monospace look like this.

A Section

Lists look like this:

  • First

  • Second. Can be multiple lines but must be indented properly.

A Sub-Section

Numbered lists look like you’d expect:

  1. hi there

  2. must be going

Urls are http://like.this and links can be written like this.

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

FluorSeg-0.0.26.dev0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

FluorSeg-0.0.26.dev0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file FluorSeg-0.0.26.dev0.tar.gz.

File metadata

  • Download URL: FluorSeg-0.0.26.dev0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.7

File hashes

Hashes for FluorSeg-0.0.26.dev0.tar.gz
Algorithm Hash digest
SHA256 28fbf98684c450b7220432676e306d6dc72adf5f081b2926fa574252c218df70
MD5 6980d680093a06bfca8c68e9af1f09dc
BLAKE2b-256 c942380e3ea21b434afbf2204eaea145d95dbc019a542f86099974f1717bf175

See more details on using hashes here.

File details

Details for the file FluorSeg-0.0.26.dev0-py3-none-any.whl.

File metadata

  • Download URL: FluorSeg-0.0.26.dev0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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/40.5.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.7

File hashes

Hashes for FluorSeg-0.0.26.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 123046a944ff71a64966b157e42dcff7b095cd3d819a24200349b7e28f375c9f
MD5 db2808ef31f2c41c92765a266d15f921
BLAKE2b-256 7c19737f3df0c183aa6b809eeb92b36203894657d8c2b1714fd9146dd3a39e47

See more details on using hashes here.

Supported by

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