Skip to content

Commit

Permalink
bug fix in point layer duplication, v1.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjinliu committed Aug 17, 2021
1 parent 52b7959 commit ea10ce8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
25 changes: 23 additions & 2 deletions docs/tutorial_viewer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ multiple abilities to make your image processing efficient.

ip.gui -> viewer;
viewer [label = "napari.Viewer components + extended functions", width = 360];

ip.gui -> MainFig;
MainFig [label = "Figure"];

ip.gui -> Explorer;

ip.gui -> Table-0 -> Figure-0;
ip.gui -> Table-1 -> Figure-1;
ip.gui -> Table-2 -> Figure-2;
Expand All @@ -24,6 +28,7 @@ multiple abilities to make your image processing efficient.
Figure-1 [label = "Figure"];
Table-2 [label = "Table"];
Figure-2 [label = "Figure"];

ip.gui -> Logger;

ip.gui [color = pink];
Expand Down Expand Up @@ -189,12 +194,13 @@ Keyboard Shortcuts
- ``Ctrl`` + ``Shift`` + ``A`` -> Hide non-selected layers. Display all the layers by push again.
- ``Ctrl`` + ``Shift`` + ``F`` -> Move selected layers to front.
- ``Alt`` + ``L`` -> Convert all the shapes in seleted shape-layers into labels of selected image-layers.
- ``Ctrl`` + ``Shift`` + ``D`` -> Duplicate selected layers.
- ``Ctrl`` + ``Shift`` + ``D`` -> Duplicate the selected layer. If an image layer is selected, an dialog box opens.
- ``Ctrl`` + ``Shift`` + ``X`` -> Crop selected image-layers with all the rectangles in selected shape-layers. Rotated
cropping is also supported!
- ``/`` -> Reslice selected image-layers with all the lines and paths in selected shape-layers. Result is stored in
``ip.gui.results`` for now.
- ``Ctrl`` + ``P`` -> Projection of shape-layers or point-layers to 2D layers.
- ``Ctrl`` + ``Shift`` + ``E`` -> Open an explorer widget.
- ``Ctrl`` + ``P`` -> Projection of the selected layer. If an image layer is selected, an dialog box opens.
- ``Ctrl`` + ``G`` / ``Ctrl`` + ``Shift`` + ``G`` -> Link/Unlink layers. Like "grouping" in PowerPoint.

Functions Menu
Expand All @@ -217,6 +223,7 @@ Others
* Call ``impy.imread`` in "File > imread ...".
* Call ``impy.imsave`` in "File > imsave ...".
* Call ``pandas.read_csv`` and add an table widget in "File > pandas.read_csv ...".
* Open explorer widget in "File > Open explorer".

|
Expand Down Expand Up @@ -312,6 +319,20 @@ If you want to show all the printed strings in the logger, you can use context m
print("something")
logging.warning("WARNING")
Explorer
========

You can open a read-only explorer widget inside the viewer, from "File" menu or shortcut "Ctrl+Shift+E". From the
explorer you can open files by double-clicking them, or filter files with wildcard strings. When a file is copied
by "Ctrl+C" its absolute path is always copied to the clipboard.

Text File Viewer
================

When you double-clicked a txt file in the explorer, a read-only text file viewer widget is added to the viewer. You can
search by words or regular expressions in the widget. This widget is very useful when you want to view an image file and
refer to its metadata file at the same time.

Plug Custom Functions into GUI
==============================

Expand Down
2 changes: 1 addition & 1 deletion impy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.20.10"
__version__ = "1.21.0"

import logging
from ._const import Const, SetConst
Expand Down
4 changes: 2 additions & 2 deletions impy/viewer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def copy_layer(layer):
kwargs["interpolation"] = "nearest"

# This is necessarry for text bound layers.
if "properties" in kwargs:
kwargs.pop("properties")
kwargs.pop("properties", None)
kwargs.pop("property_choices", None)

copy = layer.__class__(args, **kwargs)

Expand Down

0 comments on commit ea10ce8

Please sign in to comment.