{"id":51017358,"url":"https://github.com/khanlab/imaris_ims_zarr","last_synced_at":"2026-06-21T12:30:30.649Z","repository":{"id":356364402,"uuid":"1232209749","full_name":"khanlab/imaris_ims_zarr","owner":"khanlab","description":"Imaris file format reader","archived":false,"fork":false,"pushed_at":"2026-05-11T18:19:04.000Z","size":99876,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-29T02:03:38.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"CBI-PITT/imaris_ims_file_reader","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khanlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-07T17:43:40.000Z","updated_at":"2026-05-11T16:10:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/khanlab/imaris_ims_zarr","commit_stats":null,"previous_names":["khanlab/imaris_ims_file_reader","khanlab/imaris_ims_zarr"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/khanlab/imaris_ims_zarr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fimaris_ims_zarr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fimaris_ims_zarr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fimaris_ims_zarr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fimaris_ims_zarr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khanlab","download_url":"https://codeload.github.com/khanlab/imaris_ims_zarr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fimaris_ims_zarr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34610826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-21T12:30:28.780Z","updated_at":"2026-06-21T12:30:30.644Z","avatar_url":"https://github.com/khanlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imaris-ims-zarr\n\nImaris file format (*.ims) reader with zarr v3 support.\n\n```\npip install imaris-ims-zarr\n```\n\n```python\nfrom imaris_ims_zarr.ims import ims\n\na = ims('myFile.ims')\n\n# Slice a like a numpy array always with 5 axes to access the highest resolution - level 0 - (t,c,z,y,x)\na[0,0,5,:,:] # Time point 0, Channel 0, z-layer 5\n\n# Slice in 6 axes to designate the desired resolution level to work with - 0 is default and the highest resolution\na[3,0,0,5,:,:] # Resolution Level 3, Time point 0, Channel 0, z-layer 5\n\nprint(a.ResolutionLevelLock)\nprint(a.ResolutionLevels)\nprint(a.TimePoints)\nprint(a.Channels)\nprint(a.shape)\nprint(a.chunks)\nprint(a.dtype)\nprint(a.ndim)\n\n# A 'resolution lock' can be set when making the class which allows for 5 axis slicing that always extracts from that resoltion level\na = ims('myFile.ims', ResolutionLevelLock=3)\n\n# Change ResolutionLevelLock after the class is open\na.change_resolution_lock(2)\nprint(a.ResolutionLevelLock)\n\n# The 'squeeze_output' option returns arrays in their reduced form similar to a numpy array.  This is True by default to maintain behavior similar to numpy; however, some applications may benefit from predictably returning a 5 axis array.  For example, napari prefers to have outputs with the same number of axes as the input.\na = ims('myFile.ims')\nprint(a[0,0,0].shape)\n#(1024,1024)\n\na = ims('myFile.ims', squeeze_output=False)\nprint(a[0,0,0].shape)\n#(1,1,1,1024,1024)\n\n#########################################################\n###  Open the Imaris file as a Zarr Store (read only) ###\n#########################################################\nfrom imaris_ims_zarr.ims import ims\nimport zarr\n\nstore = ims('myFile.ims', ResolutionLevelLock=2, aszarr=True)\nprint(store)\n#\u003cimaris_ims_zarr.ims_zarr_store.ims_zarr_store object at 0x7f48965f9ac0\u003e\n\n# The store object is NOT a sliceable array, but it does have attributes that describe what to expect after opening the store.\nprint(store.ResolutionLevelLock)\nprint(store.ResolutionLevels)\nprint(store.TimePoints)\nprint(store.Channels)\nprint(store.shape)\nprint(store.chunks)\nprint(store.dtype)\nprint(store.ndim)\n\nzarray = zarr.open_array(store=store, mode='r')\nprint(zarray.shape)\nprint(zarray.chunks)\nprint(zarray.dtype)\nprint(zarray.ndim)\n\nprint(zarray[0,0,0].shape)\n#(1024,1024)\n\n###############################################################\n###  Process-safe store for multiprocessing / Dask workers  ###\n###############################################################\n# The standard ims_zarr_store holds an open HDF5 file handle which is\n# not picklable.  ImsProcessSafeStore wraps it so that the store can be\n# safely serialized across process boundaries (Dask, joblib, etc.).\n\nfrom imaris_ims_zarr import ImsProcessSafeStore\nimport zarr\nimport pickle\n\nstore = ImsProcessSafeStore('myFile.ims', ResolutionLevelLock=0)\n\n# Metadata attributes are available immediately\nprint(store.ResolutionLevelLock)\nprint(store.ResolutionLevels)\nprint(store.TimePoints)\nprint(store.Channels)\nprint(store.shape)\nprint(store.chunks)\nprint(store.dtype)\nprint(store.ndim)\nprint(store.resolution)  # (x_res, y_res, z_res) in micrometres\n\nzarray = zarr.open_array(store=store, mode='r')\nprint(zarray[0, 0, :, :, :].shape)\n\n# Round-trip through pickle works transparently\nstore2 = pickle.loads(pickle.dumps(store))\nzarray2 = zarr.open_array(store=store2, mode='r')\nprint(zarray2[0, 0, :, :, :].shape)\n```\n\n\n\n#### Historical Change Log (from imaris_ims_file_reader this was adapted from):\n\n\n##### v0.1.3:\n\nClass name has been changed to all lowercase ('ims') to be compatible with many other dependent applications.\n\n##### v0.1.4:\n\nBug Fix:  Issue #4, get_Volume_At_Specific_Resolution does not extract the desired time point and color\n\n**v0.1.5:**\n\n-Compatibility changes for Napari.\n\n-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.\n\n**v0.1.6:**\n\n-Return default behaviour back to squeeze_output=True so that the reader performance more like a normal numpy array.\n\n**v0.1.7:**\n\n-Add warnings when HistogramMax and HistogramMin values are not present in channel data.  This is an issue when writing time series with PyImarisWriter.  The absence of these values may cause compatibility issues with programs that use this library.\n\n**v0.1.8:**\n\n-Changed resolution rounding behaviour to make resolution calculation on ResolutionLevels \u003e 0 more accurate\n\n-Added option 'resolution_decimal_places' which enables the user to choose the number of decimal places to round resolutions (default:3).  'None' will NOT round the output.\n\n-Added a new ims convenience function.  This aims to be a drop in replacement with all previous versions of the library, but adds an 'aszarr' option.  If aszarr=True (default:False), the object returned is a zarr store.  zarr.open(store,mode='r') to interact with the array.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanlab%2Fimaris_ims_zarr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhanlab%2Fimaris_ims_zarr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanlab%2Fimaris_ims_zarr/lists"}