Code Monkey home page Code Monkey logo

scanreader-matlab's Introduction

scanreader-matlab

Matlab TIFF Stack Reader for ScanImage 5 scans (including multiROI).

We treat a scan as a collection of recording fields: rectangular planes at a given x, y, z position in the scan recorded in a number of channels during a preset amount of time. All fields have the same number of channels and number of frames.

We plan to support new versions of ScanImage scans as our lab starts using them. If you would like us to add support for an older (or different) version of ScanImage, send us a small sample scan.

Installation

Make the +scanreader/ package folder accesible to Matlab.

Usage

scan = scanreader.readscan('/data/my_scan_*.tif')
print(scan.version)
print(scan.nFrames)
print(scan.nChannels)
print(scan.nFields)

for i = 1:scan.nFields
    field = scan(i, :, :, :, :)
    % process field (4-d array: [y, x, channels, frames])
    clear field % free memory before next iteration
end

x = scan() % 5-d array [fields, y, x, channel, frames]
y = scan(1:2, :, :, 1, end-999: end) % 5-d array: last 1000 frames of first 2 fields on the first channel
z = scan(2, :, :, :, :) % 4-d array: the second field (over all channels and time)

scan = scanreader.read_scan('/data/my_scan_*.tif', 'float32', true)
% scan loaded as float32 (default is int16) and adjacent fields at same depth will be joined.

Scan objects (returned by readscan()) are indexable (as shown). Indexes can be arrays of positive integers or ':'. It should act like a Matlab 5-d array (with added automatic squeezing of single valued dimensions)---no linear or boolean indexing, though.

This is a Matlab port of atlab/scanreader, originally in Python.

scanreader-matlab's People

Contributors

ecobost avatar ranford avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.