{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": false, "pycharm": { "name": "#%% md\n" } }, "source": [ "# Parse and load data-sets\n", "\n", "´APR-pipelines´ makes it easy to automatically load a data-set. Several parser method are provided:\n", "1. A general parser where each tile is saved as ´row_col.tif´ (it can be 3D tiffs or 2D tiffs saved in a folder named ´row_col´)\n", "2. COLM (Clarity Optimised Lightsheet Microscope) data\n", "3. ClearScope data\n", "\n", "Note that it is very easy to support new data architecture, you can get in touch for a given implementation. For the first case we use the ´tileParser´ class:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "import paprica\n", "\n", "tiles = paprica.tileParser(path='path to the folder containing the data',\n", " frame_size=2048,\n", " ftype='apr')" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false, "pycharm": { "name": "#%% md\n" } }, "source": [ "For the second case we use the ´colmParser´ class (less inputs are required since the sensor size and data type is fixed by the microscope):" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "tiles = paprica.parser.colmParser(path='path to the COLM folder acquisition')" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false, "pycharm": { "name": "#%% md\n" } }, "source": [ "And finally for the third case we use the ´clearscopeParser´ class:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "tiles = paprica.parser.clearscopeParser(path='path to the ClearScope folder acquisition')" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false, "pycharm": { "name": "#%% md\n" } }, "source": [ "Note that each channel must be parsed independently (this implementation choice was made to give more flexibility to the user):" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "tiles_ch0 = paprica.parser.colmParser(path='path to the COLM folder acquisition', channel=0)\n", "tiles_ch1 = paprica.parser.colmParser(path='path to the COLM folder acquisition', channel=1)\n", "tiles_ch2 = paprica.parser.colmParser(path='path to the COLM folder acquisition', channel=2)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.9.10 ('env': venv)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "3.9.10" }, "vscode": { "interpreter": { "hash": "996559e7c3af3717ab7f512df65efa103e5d1d52a1762ef1fac31796ff1d7bc1" } } }, "nbformat": 4, "nbformat_minor": 0 }