Class for reading Bitplane imaris files (*.ims)
Project description
imaris-ims-file-reader
Imaris file format reader - *.ims
pip install imaris-ims-file-reader
from imaris_ims_file_reader.ims import ims
a = ims(myFile.ims)
# Slice a like a numpy array always with 5 axes to access the highest resolution - level 0 - (t,c,z,y,x)
a[0,0,5,:,:] # Time point 0, Channel 0, z-layer 5
# Slice in 6 axes to designate the desired resolution level to work with - 0 is default and the highest resolution
a[3,0,0,5,:,:] # Resolution Level 3, Time point 0, Channel 0, z-layer 5
print(a.ResolutionLevelLock)
print(a.ResolutionLevels)
print(a.TimePoints)
print(a.Channels)
print(a.shape)
print(a.chunks)
print(a.dtype)
print(a.ndim)
# A 'resolution lock' can be set when making the class which allows for 5 axis slicing that always extracts from that resoltion level
a = ims(myFile.ims,ResolutionLevelLock=3)
# Change ResolutionLevelLock after the class is open
a.change_resolution_lock(2)
print(a.ResolutionLevelLock)
# 'squeeze_output' option returns arrays in their reduced form similar to a numpy array. This is off by default to maintain compatibility with the rest of the imaris-ims-file-reader API.
a = ims(myFile.ims)
print(a[0,0,0].shape)
#(1,1,1,1024,1024)
a = ims(myFile.ims, squeeze_output=True)
print(a[0,0,0].shape)
#(1024,1024)
Change Log:
v0.1.3:
Class name has been changed to all lowercase ('ims') to be compatible with many other dependent applications.
v0.1.4:
Bug Fix: Issue #4, get_Volume_At_Specific_Resolution does not extract the desired time point and color
v0.1.5:
-Compatibility changes for Napari.
-Default behaviour changed to always return a 5-dim array. squeeze_output=True can be specified to remove all single dims by automatically calling np.squeeze on outputs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
imaris_ims_file_reader-0.1.5.tar.gz
(102.1 MB
view hashes)
Built Distribution
Close
Hashes for imaris_ims_file_reader-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d49735d0c317e73a36532b980f6ad029a097cb5353406740f0c77bbcd5ebc69 |
|
MD5 | 526c9d38e23f895e3a345b901545b23f |
|
BLAKE2b-256 | 2022656568f7141691d6b2d2fef6288f0e5ac5a0b14c8e46b13b872dd32e9f1d |
Close
Hashes for imaris_ims_file_reader-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b725c6c0d6dd61fbbe1a6e4c1476d62a6275cd667694f711f2b122ea95f45b6 |
|
MD5 | 49c91763573dbf1418caeeee8c282e8a |
|
BLAKE2b-256 | 9e5377166a7f963e8e96d067ab77f6d99bc4161d2e8b668f1b3a6aa75e6e0bab |