{"name":"napari-crop","display_name":"napari-crop","visibility":"public","icon":"","categories":[],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-crop.crop_region","title":"Crop Region(s) with Shapes layer","python_name":"napari_crop._function:crop_region","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-crop.CutWithPlane","title":"Create Cut With Plane","python_name":"napari_crop._dock_widgets:CutWithPlane","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-crop.draw_fixed_shapes","title":"Draw shapes of fixed dimensions","python_name":"napari_crop._function:draw_fixed_shapes","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-crop.CutWithPlane","display_name":"Cut With Plane","autogenerate":false},{"command":"napari-crop.crop_region","display_name":"Crop Region(s)","autogenerate":true},{"command":"napari-crop.draw_fixed_shapes","display_name":"Draw Fixed Shapes","autogenerate":false}],"sample_data":null,"themes":null,"menus":{"napari/layers/transform":[{"command":"napari-crop.crop_region","when":null,"group":null,"alt":null},{"command":"napari-crop.draw_fixed_shapes","when":null,"group":null,"alt":null},{"command":"napari-crop.CutWithPlane","when":null,"group":null,"alt":null}]},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.4","name":"napari-crop","version":"0.1.12","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"Crop regions in napari manually","description":"# napari-crop\n\n[![License](https://img.shields.io/pypi/l/napari-crop.svg?color=green)](https://github.com/BiAPoL/napari-crop/raw/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-crop.svg?color=green)](https://pypi.org/project/napari-crop)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-crop.svg?color=green)](https://python.org)\n[![tests](https://github.com/BiAPoL/napari-crop/workflows/tests/badge.svg)](https://github.com/BiAPoL/napari-crop/actions)\n[![codecov](https://codecov.io/gh/BiAPoL/napari-crop/branch/main/graph/badge.svg)](https://codecov.io/gh/BiAPoL/napari-crop)\n[![DOI](https://zenodo.org/badge/419822240.svg)](https://zenodo.org/badge/latestdoi/419822240)\n\n🚨🚨🚨 **Call for maintainers** 🚨🚨🚨\n\nIf you are interested in further developing it, please get in touch or create a fork.\n\nCrop regions in napari manually\n\n![](https://github.com/BiAPoL/napari-crop/raw/main/images/screencast.gif)\n\nCrop in any dimension\n\n![](https://github.com/BiAPoL/napari-crop/raw/main/images/side_crop.gif)\n\nCut a volume using a plane\n\n*Note:*\n\n*- this functionality currently only works with 3D data*\n\n*- to drag the plane, hold the 'SHIFT' key from your keyboard*\n\n![](https://github.com/BiAPoL/napari-crop/raw/main/images/napari_crop_cut_with_plane_demo.gif)\n\nDraw shapes of fixed size at given coordinates for later cropping\n\n*Note:*\n\n*- the shapes are drawn with the specified width and height, but, since the crop widget is very permissive as it tends to include all pixels the shape \"touches\", the cropped result tends to be 1pixel larger in both dimensions. Therefore, to have a 64x64 array after cropping, it is best to set the shape sizes here to 63x63 for example.*\n\n![](https://github.com/BiAPoL/napari-crop/raw/main/images/napari_crop_draw_shapes.gif)\n\n## Usage\nCreate a new shapes layer to annotate the region you would like to crop:\n\n![](https://github.com/BiAPoL/napari-crop/raw/main/images/shapes.png)\n\nUse the rectangle tool to annotate a region. Start the `crop` tool from the `Plugins > napari-crop > Crop region` or, if available, `Tools > Utilities > Crop region` menu or `Layer > Transform > Crop region(s)`. \nClick the `Run` button to crop the region.\n\n![](https://github.com/BiAPoL/napari-crop/raw/main/images/draw_rectangle.png)\n\nYou can also use the `Select shapes` tool to move the rectangle to a new place and crop another region by clicking on `Run`.\n\n![](https://github.com/BiAPoL/napari-crop/raw/main/images/move_rectangle.png)\n\nHint: You can also use the [napari-tabu](https://www.napari-hub.org/plugins/napari-tabu) plugin to send all your cropped images to a new napari window.\n\n![](https://github.com/BiAPoL/napari-crop/raw/main/images/new_window.gif)\n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using with [@napari]'s [cookiecutter-napari-plugin] template.\n\n## Installation\n\nYou can install `napari-crop` via [pip]:\n\n    pip install napari-crop\n\n## Contributing\n\nContributions are very welcome. \n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-crop\" is free and open source software\n\n## Issues\n\nIf you encounter any problems, please create a thread on [image.sc] along with a detailed description and tag [@haesleinhuepf].\n\n[napari]: https://github.com/napari/napari\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[@napari]: https://github.com/napari\n[MIT]: http://opensource.org/licenses/MIT\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt\n[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt\n[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n[file an issue]: https://github.com/BiAPoL/napari-crop/issues\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n[image.sc]: https://image.sc\n[@haesleinhuepf]: https://twitter.com/haesleinhuepf\n\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"Tim Morello, Marcelo Leomil Zoccoler, Johannes Soltwedel","author_email":"Robert Haase <robert.haase@tu-dresden.de>","maintainer":null,"maintainer_email":null,"license":"Copyright (c) 2021, Robert Haase, Tim Morello, Marcelo Zoccoler, DFG Cluster of Excellence \"Physics of Life\", TU Dresden\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of napari-manual-split-and-merge-labels nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","classifier":["Development Status :: 3 - Alpha","Intended Audience :: Developers","Framework :: napari","Topic :: Scientific/Engineering :: Image Processing","Topic :: Scientific/Engineering :: Information Analysis","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Operating System :: OS Independent","License :: OSI Approved :: BSD License"],"requires_dist":["napari-plugin-engine>=0.1.4","numpy","scikit-image","napari-tools-menu>=0.1.17","napari-workflows","tox; extra == \"testing\"","pytest; extra == \"testing\"","pytest-cov; extra == \"testing\"","pytest-qt; extra == \"testing\"","napari; extra == \"testing\"","pyqt5; extra == \"testing\""],"requires_python":">=3.10","requires_external":null,"project_url":["Homepage, https://github.com/biapol/napari-crop","Bug Tracker, https://github.com/biapol/napari-crop/issues","Documentation, https://github.com/biapol/napari-crop#README.md","Source Code, https://github.com/biapol/napari-crop","User Support, https://github.com/biapol/napari-crop/issues"],"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}