From e854031f5dfcb56776cde1a261c6aae84dcc6dae Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Wed, 8 May 2024 13:37:49 -0500 Subject: [PATCH 1/7] Add basic layer modes description ('pan_zoom' and 'transform') --- docs/guides/layers.md | 18 ++++++++++++++++++ docs/howtos/layers/shapes.md | 2 +- docs/images/transform-tool.png | Bin 0 -> 854 bytes 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 docs/images/transform-tool.png diff --git a/docs/guides/layers.md b/docs/guides/layers.md index 596f01480..edf173dec 100644 --- a/docs/guides/layers.md +++ b/docs/guides/layers.md @@ -28,6 +28,24 @@ currently supported by napari, check out the introduction, check out the [Layer list section in the napari viewer tutorial](layer-list). +(layer_mode)= +## Layer mode + +All our layers support a `mode` property that changes the way you interact +with the layer from the viewer. These modes are accesible via the layer controls widget top buttons and via shortcuts (pressing a number from `1` to the number of modes available for the layer). Depending on the layer type, more modes could be available. Currently, there are two base modes: Pan and zoom (`pan_zoom`) and Transform (`transform`): + +* Pan and zoom +![image: Pan/zoom](../images/pan-zoom-tool.png) + +The `pan_zoom` mode allows you to pan around and zoom in/out the layer. It's the default mode selected. + +* Transform +![image: Transform](../images/transform-tool.png) + +The `transform` mode allows you to translate, rotate, and scale the layer graphically. To reset the transformation, you can Option/Alt-click the transform button over the layer controls (a confirmation dialog will open to confirm the reset). + +For a more detailed description of layer modes available check each [layer how-to guide](using-layers). + ## Layer visibility All our layers support a visibility toggle that allows you to set the `visible` diff --git a/docs/howtos/layers/shapes.md b/docs/howtos/layers/shapes.md index 03b85f09d..81267e1bf 100644 --- a/docs/howtos/layers/shapes.md +++ b/docs/howtos/layers/shapes.md @@ -171,7 +171,7 @@ are used. i.e. You can't remove a vertex before you have created a shape. than one shape, select one, hold down the shift key and select the rest. * **Pan/zoom** - ![image: Select shapes](../../images/pan-zoom-tool.png) + ![image: Pan/zoom](../../images/pan-zoom-tool.png) Use this tool to pan around the image or zoom in. Pan and zoom functionality is disabled when using the adding and editing tools. Temporarily re-enable pan diff --git a/docs/images/transform-tool.png b/docs/images/transform-tool.png new file mode 100644 index 0000000000000000000000000000000000000000..3488d5701887863a84a4ad4879c6add5972ebe20 GIT binary patch literal 854 zcmV-c1F8IpP)y|^4;sZN@>(KqA}&xUN+p<-3C5tt#Aua-3Iq^AKv-V-e>&Ae zX0toMvb&p20P3w zIq&2_-Dm@Cu~0G?6uK)2RxjF8gwf*>hd%P>j# zi)aQ?^vo#Z((e=mVe|rx1;!tW5defpXYx>~HbfwU)u-A+V}bGUF%ViEI7{bX-sAzB zD+rZZ9jaFXELgnv17r7wVb0_x#tarO%o<&yVSJBZ7)ng&x#gamG_-7Aw`W$v??@;P zkIzH^RymHn!7U>9>vus>4rO)2xK=kvZhS}_C>r5BVJKbJVDI3kqMR<6*H#}aXh=%d zTV}`F&^*%Q885#H4WUgEQ%w%AAd5CXG+SM$)rEm|NHq+C2+aQ8r&v%$X(bEo5^S z5Z_4xhJ`}V7Q_3ea6xoo$fOHX1%rzCjcpMqogKbSvDV=3!D@`gj*e4+JCDL(i-mAA zo&XQOC3~+Lh61(P*Te`GIjI3@KmKW-z|eCF+gzapo9`1aZ|)UBsXXm#g273cKV}C{ zK+wg~s!Nq(9yHtCJ|Kju3vE(!Z0=CsVl=~0gS4{le>?3{iZVwhsev$3Z-t^CWpj1I zxC2p=L%YczGKCb@6^Qo1;3mlAitzdCcfjL>o@;cDZWvV1I~<+xYS{(2N|R$v29_(7 zMWB4KJhbwT1%@h##CC|$YE1yn6C!Z{_~URsaA107*qoM6N<$g0gak0RR91 literal 0 HcmV?d00001 From 7f6656ffae2a490fcaf374ee4db3a7e1ebdccf77 Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Thu, 9 May 2024 12:22:23 -0500 Subject: [PATCH 2/7] Add info about pan/zoom and transform mode button for layers specific descriptions --- docs/guides/layers.md | 17 ++++++--- docs/howtos/layers/image.md | 32 +++++++++++++---- docs/howtos/layers/labels.md | 9 +++++ docs/howtos/layers/points.md | 9 +++++ docs/howtos/layers/shapes.md | 8 +++++ docs/howtos/layers/surface.md | 37 ++++++++++++-------- docs/howtos/layers/tracks.md | 65 ++++++++++++++++++++--------------- docs/howtos/layers/vectors.md | 57 ++++++++++++++++-------------- 8 files changed, 156 insertions(+), 78 deletions(-) diff --git a/docs/guides/layers.md b/docs/guides/layers.md index edf173dec..6c8d0c118 100644 --- a/docs/guides/layers.md +++ b/docs/guides/layers.md @@ -32,19 +32,28 @@ introduction, check out the ## Layer mode All our layers support a `mode` property that changes the way you interact -with the layer from the viewer. These modes are accesible via the layer controls widget top buttons and via shortcuts (pressing a number from `1` to the number of modes available for the layer). Depending on the layer type, more modes could be available. Currently, there are two base modes: Pan and zoom (`pan_zoom`) and Transform (`transform`): +with the layer from the viewer. These modes are accesible via the layer controls +widget top buttons and via shortcuts (pressing a number from `1` to the number of +modes available for the layer). Depending on the layer type, more modes could be +available. Currently, there are two base modes: Pan and zoom (`pan_zoom`) +and Transform (`transform`): * Pan and zoom ![image: Pan/zoom](../images/pan-zoom-tool.png) -The `pan_zoom` mode allows you to pan around and zoom in/out the layer. It's the default mode selected. +The `pan_zoom` mode allows you to pan around and zoom in/out the layer. It's +the default mode selected. * Transform ![image: Transform](../images/transform-tool.png) -The `transform` mode allows you to translate, rotate, and scale the layer graphically. To reset the transformation, you can Option/Alt-click the transform button over the layer controls (a confirmation dialog will open to confirm the reset). +The `transform` mode allows you to translate, rotate, and scale the layer +graphically. To reset the transformation, you can Option/Alt-click the transform +button over the layer controls (a confirmation dialog will open to confirm +the reset). -For a more detailed description of layer modes available check each [layer how-to guide](using-layers). +For a more detailed description of layer modes available check each +[layer how-to guide](using-layers). ## Layer visibility diff --git a/docs/howtos/layers/image.md b/docs/howtos/layers/image.md index cdb6b8132..788d3e85c 100644 --- a/docs/howtos/layers/image.md +++ b/docs/howtos/layers/image.md @@ -25,19 +25,37 @@ For more information about layers, refer to [Layers at a glance](../../guides/la The GUI contains following tools in the `layer controls` panel for the `image` layer: -* Opacity -* Contrast Limits -* Auto-contrast -* Gamma -* Colormap -* Blending -* Interpolation + +* Buttons + * Pan/zoom + * Transform +* Controls + * Opacity + * Contrast Limits + * Auto-contrast + * Gamma + * Colormap + * Blending + * Interpolation Before we can use any of the GUI `layer controls`, we must load an image. 1. Start napari. 2. Click `File` > `Open Sample` > `napari builtins` > `Cells (3D+2Ch)` or any sample image of your choice. +### Buttons + +* `Pan/zoom` ![image: Pan/zoom tool](../../images/pan-zoom-tool.png) is the default mode + of the layer and supports panning and zooming. Press the `1` key when the layer is selected + to use this mode. + +* `Transform` ![image: Transform](../../images/transform-tool.png) enables you to + rotate, scale, or translate the layer. To reset the transformation, + you can Option/Alt-click the transform button (a confirmation dialog will open to + confirm the reset). Press the `2` key when the layer is selected to use this mode. + +### Controls + The GUI controls may be adjusted as follows: * `opacity` is adjusted by moving the circle along the slider until the image diff --git a/docs/howtos/layers/labels.md b/docs/howtos/layers/labels.md index badc22cd7..91b09d16a 100644 --- a/docs/howtos/layers/labels.md +++ b/docs/howtos/layers/labels.md @@ -46,6 +46,7 @@ layer: * fill bucket * color picker * pan/zoom mode + * transform mode * Controls * label * opacity @@ -256,6 +257,14 @@ pan and zoom is selected, editing the layer is not possible. Once you click on one of the editing tools, pan and zoom is turned off. Return to pan and zoom mode by pressing the `6` key when the `labels layer` is selected. +### Transform mode + +This mode is represented by ![image: Transform](../../images/transform-tool.png) in the +`layer controls` panel. It enables you to rotate, scale, or translate the layer. +To reset the transformation, you can Option/Alt-click the transform button (a +confirmation dialog will open to confirm the reset). Enable this mode by pressing +the `7` key when the `labels layer` is selected. + ### Creating a new `labels layer` Create a brand-new empty `labels layer` by clicking the `New labels layer` diff --git a/docs/howtos/layers/points.md b/docs/howtos/layers/points.md index 36b6d369a..da4e694c1 100644 --- a/docs/howtos/layers/points.md +++ b/docs/howtos/layers/points.md @@ -54,6 +54,7 @@ layer: * Add points * Select points * Pan/zoom + * Transform * Controls * Opacity * Point size @@ -125,6 +126,14 @@ layer: options are supported only when viewing a layer using 2D rendering. Return to pan and zoom mode by pressing the `4` key when the points layer is selected. +* **Transform** + ![image: Transform](../../images/transform-tool.png) + + Use this tool to rotate, scale, or translate the layer. To reset the transformation, + you can Option/Alt-click the transform button (a confirmation dialog will open to + confirm the reset). Enable this mode by pressing the `5` key when the points layer + is selected. + ### Controls * Opacity diff --git a/docs/howtos/layers/shapes.md b/docs/howtos/layers/shapes.md index 81267e1bf..ee5031f51 100644 --- a/docs/howtos/layers/shapes.md +++ b/docs/howtos/layers/shapes.md @@ -118,6 +118,7 @@ are used. i.e. You can't remove a vertex before you have created a shape. * Select vertices * Select shapes * Pan/zoom + * Transform * Move to back * Move to front * Add ellipses @@ -178,6 +179,13 @@ are used. i.e. You can't remove a vertex before you have created a shape. and zoom by pressing and holding the spacebar. This feature can be useful if you want to move around the shapes layer as you edit it. +* **Transform** + ![image: Transform](../../images/transform-tool.png) + + Use this tool to rotate, scale, or translate the layer. To reset the transformation, + you can Option/Alt-click the transform button (a confirmation dialog will open to + confirm the reset). + * **Move to back** ![image: Move to back](../../images/shape-move-to-back.png) diff --git a/docs/howtos/layers/surface.md b/docs/howtos/layers/surface.md index 24219575e..01a601e33 100644 --- a/docs/howtos/layers/surface.md +++ b/docs/howtos/layers/surface.md @@ -77,20 +77,29 @@ viewer.close() Once you have created a `surface` layer programmatically, the following GUI controls are available in the viewer: -* Opacity - use this slider control to assign opacity from 0 to 1.00 where 0 is - transparent and 1.00 is completely opaque. -* Contrast Limits - click and slide the dots on either end of the slider bar to - adjust upper and lower contrast limits. -* Auto-contrast - choose once or continuous. -* Gamma - Click on the oval on the gamma slider bar and adjust it to any value - between 0.20 and 2.00. Gamma correction or gamma is a nonlinear operation used - to encode and decode luminance or tristimulus values in video or still image - systems. -* Colormap - select a value from the dropdown list. -* Blending - Choose `opaque`, `translucent`, `translucent no depth`, or - `additive` from the dropdown. Refer to the [Blending layers](blending-layers) - section of _Layers at a glance_ for an explanation of each type of blending. -* Shading - Choose `none`, `flat`, or `smooth` from the dropdown. +* **Buttons** + * Pan/zoom - ![image: Pan/zoom tool](../../images/pan-zoom-tool.png) is the default + mode of the layer and supports panning and zooming. Press the `1` key when the + layer is selected to use this mode. + * Transform - ![image: Transform](../../images/transform-tool.png) enables you to + rotate, scale, or translate the layer. To reset the transformation, you can + Option/Alt-click the transform button (a confirmation dialog will open to + confirm the reset). Press the `2` key when the layer is selected to use this mode. +* **Controls** + * Opacity - use this slider control to assign opacity from 0 to 1.00 where 0 is + transparent and 1.00 is completely opaque. + * Contrast Limits - click and slide the dots on either end of the slider bar to + adjust upper and lower contrast limits. + * Auto-contrast - choose once or continuous. + * Gamma - Click on the oval on the gamma slider bar and adjust it to any value + between 0.20 and 2.00. Gamma correction or gamma is a nonlinear operation used + to encode and decode luminance or tristimulus values in video or still image + systems. + * Colormap - select a value from the dropdown list. + * Blending - Choose `opaque`, `translucent`, `translucent no depth`, or + `additive` from the dropdown. Refer to the [Blending layers](blending-layers) + section of _Layers at a glance_ for an explanation of each type of blending. + * Shading - Choose `none`, `flat`, or `smooth` from the dropdown. ## Arguments of `view_surface` and `add_surface` diff --git a/docs/howtos/layers/tracks.md b/docs/howtos/layers/tracks.md index 0f46bf10c..5066f4b75 100644 --- a/docs/howtos/layers/tracks.md +++ b/docs/howtos/layers/tracks.md @@ -92,34 +92,43 @@ napari.run() ## GUI controls for the `tracks` layer -* Color by - there is a dropdown for this but at present the only choice is - `track_id`. -* Colormap - choose a colormap from the dropdown. These are explained in - [the colormaps section](./surface.md#working-with-colormaps) of - _Using the surface layer_. -* Blending - choose `opaque`, `translucent`, `translucent no depth`, `minimum` - or `additive` from the dropdown. Refer to the - [Blending layers](blending-layers) section of _Layers at a glance_ for an - explanation of each type of blending. -* Opacity - click and hold the circle on the opacity slider bar and adjust it to - any value between 0.00 (clear) and 1.00 (completely opaque). -* Tail width - adjusting the tail width gives the track the appearance of being - narrower or wider. At the minimum value, the track looks like a one-pixel - line. -* Tail length - adjusting the tail length gives the track the appearance of - being shorter or longer. At the minimum value, it looks something like a - dotted line, at the maximum value it almost looks like an unbroken line. -* Head length - Adjusting the head length gives the track the appearance of - being longer. If it is adjusted to the maximum value, the tracks look like - stripes. At the minimum value, the tracks flash across the canvas and - disappear before starting again. -* Tail - check this box to see the tracks. If it is not checked, you will not be - able to see the tracks at all. -* Show ID - check this box to display a previously assigned `track_id` label for - each track. Assigning values to `track_id` is explained in - [Tracks data](#tracks-data) below. -* Graph - check this box to display a previously created graph as explained in - [](#arguments-of-view_tracks-and-add_tracks). +* **Buttons** + * Pan/zoom - ![image: Pan/zoom tool](../../images/pan-zoom-tool.png) is the default + mode of the layer and supports panning and zooming. Press the `1` key when the + layer is selected to use this mode. + * Transform - ![image: Transform](../../images/transform-tool.png) enables you to + rotate, scale, or translate the layer. To reset the transformation, you can + Option/Alt-click the transform button (a confirmation dialog will open to + confirm the reset). Press the `2` key when the layer is selected to use this mode. +* **Controls** + * Color by - there is a dropdown for this but at present the only choice is + `track_id`. + * Colormap - choose a colormap from the dropdown. These are explained in + [the colormaps section](./surface.md#working-with-colormaps) of + _Using the surface layer_. + * Blending - choose `opaque`, `translucent`, `translucent no depth`, `minimum` + or `additive` from the dropdown. Refer to the + [Blending layers](blending-layers) section of _Layers at a glance_ for an + explanation of each type of blending. + * Opacity - click and hold the circle on the opacity slider bar and adjust it to + any value between 0.00 (clear) and 1.00 (completely opaque). + * Tail width - adjusting the tail width gives the track the appearance of being + narrower or wider. At the minimum value, the track looks like a one-pixel + line. + * Tail length - adjusting the tail length gives the track the appearance of + being shorter or longer. At the minimum value, it looks something like a + dotted line, at the maximum value it almost looks like an unbroken line. + * Head length - Adjusting the head length gives the track the appearance of + being longer. If it is adjusted to the maximum value, the tracks look like + stripes. At the minimum value, the tracks flash across the canvas and + disappear before starting again. + * Tail - check this box to see the tracks. If it is not checked, you will not be + able to see the tracks at all. + * Show ID - check this box to display a previously assigned `track_id` label for + each track. Assigning values to `track_id` is explained in + [Tracks data](#tracks-data) below. + * Graph - check this box to display a previously created graph as explained in + [](#arguments-of-view_tracks-and-add_tracks). ## Arguments of `view_tracks` and `add_tracks` diff --git a/docs/howtos/layers/vectors.md b/docs/howtos/layers/vectors.md index 25c3f91df..451ca319d 100644 --- a/docs/howtos/layers/vectors.md +++ b/docs/howtos/layers/vectors.md @@ -85,29 +85,38 @@ Before you can use the GUI to manipulate vectors, you must load a vector layer. Please refer to [A simple example](#a-simple-example) to add a `vectors` layer first, then explore the editing options the GUI provides. -* Opacity - click and hold the circle on the opacity slider bar and adjust it to - any value between 0.00 (clear) and 1.00 (completely opaque). -* Width - adjusting the width makes the vectors appear thicker or thinner. Use - the + and - buttons on either side of the width bar to adjust width or click - on the number in the middle of the bar and enter a value. The minimum value is - 0.10. -* Length - adjusting the length makes the vector longer or shorter. Use the + - and - buttons on either side of the length bar to adjust length or click on - the number in the middle of the bar and enter a value. The minimum value is - 0.10. -* Blending - `blending` has the options of `opaque`, `translucent`, - `translucent no depth`, `minimum`, or `additive` in the dropdown. Refer to the - [Blending layers](blending-layers) section of _Layers at a glance_ for an - explanation of each type of blending. -* Edge color mode - select `direct`, `cycle`, or `colormap` from the dropdown. - * Direct (default mode) allows each vector to be set arbitrarily. - * Cycle allows the color to be set via a color cycle over an attribute. - * Colormap allows the color to be set via a color map over an attribute. -* Edge color - click the thumbnail next to `edge color:` to select or create a - color from the pallette. -* Out of slice - if this box is checked, `out of slice` is on or true. If this - box is not checked, `out of slice` is off or false. If it is on or true, - vectors slightly out of slice are rendered. +* **Buttons** + * Pan/zoom - ![image: Pan/zoom tool](../../images/pan-zoom-tool.png) is the default + mode of the layer and supports panning and zooming. Press the `1` key when the + layer is selected to use this mode. + * Transform - ![image: Transform](../../images/transform-tool.png) enables you to + rotate, scale, or translate the layer. To reset the transformation, you can + Option/Alt-click the transform button (a confirmation dialog will open to + confirm the reset). Press the `2` key when the layer is selected to use this mode. +* **Controls** + * Opacity - click and hold the circle on the opacity slider bar and adjust it to + any value between 0.00 (clear) and 1.00 (completely opaque). + * Width - adjusting the width makes the vectors appear thicker or thinner. Use + the + and - buttons on either side of the width bar to adjust width or click + on the number in the middle of the bar and enter a value. The minimum value is + 0.10. + * Length - adjusting the length makes the vector longer or shorter. Use the + + and - buttons on either side of the length bar to adjust length or click on + the number in the middle of the bar and enter a value. The minimum value is + 0.10. + * Blending - `blending` has the options of `opaque`, `translucent`, + `translucent no depth`, `minimum`, or `additive` in the dropdown. Refer to the + [Blending layers](blending-layers) section of _Layers at a glance_ for an + explanation of each type of blending. + * Edge color mode - select `direct`, `cycle`, or `colormap` from the dropdown. + * Direct (default mode) allows each vector to be set arbitrarily. + * Cycle allows the color to be set via a color cycle over an attribute. + * Colormap allows the color to be set via a color map over an attribute. + * Edge color - click the thumbnail next to `edge color:` to select or create a + color from the pallette. + * Out of slice - if this box is checked, `out of slice` is on or true. If this + box is not checked, `out of slice` is off or false. If it is on or true, + vectors slightly out of slice are rendered. ### Vector starting position @@ -159,8 +168,6 @@ Set the width of all the vectors in a layer using the `layer.width` property. Set the color of all the vectors in a layer using the `layer.edge_color` property. -Pan and zoom are not available on the vectors layer. - ## Vectors data The input data to the `vectors` layer must be an `Nx2xD` NumPy array From d18eede700fbbeb221ba0e1e719dd937be940abb Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Thu, 9 May 2024 13:55:08 -0500 Subject: [PATCH 3/7] Simplify base modes description --- docs/guides/layers.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/guides/layers.md b/docs/guides/layers.md index 6c8d0c118..3624b0c42 100644 --- a/docs/guides/layers.md +++ b/docs/guides/layers.md @@ -35,8 +35,7 @@ All our layers support a `mode` property that changes the way you interact with the layer from the viewer. These modes are accesible via the layer controls widget top buttons and via shortcuts (pressing a number from `1` to the number of modes available for the layer). Depending on the layer type, more modes could be -available. Currently, there are two base modes: Pan and zoom (`pan_zoom`) -and Transform (`transform`): +available. Currently, there are two base modes: * Pan and zoom ![image: Pan/zoom](../images/pan-zoom-tool.png) From fc76967b393ab11d5c748d92acfb0d9a851f1205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Althviz=20Mor=C3=A9?= <16781833+dalthviz@users.noreply.github.com> Date: Tue, 21 May 2024 10:27:07 -0500 Subject: [PATCH 4/7] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Melissa Weber Mendonça --- docs/guides/layers.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/guides/layers.md b/docs/guides/layers.md index 3624b0c42..3bfc99420 100644 --- a/docs/guides/layers.md +++ b/docs/guides/layers.md @@ -32,10 +32,8 @@ introduction, check out the ## Layer mode All our layers support a `mode` property that changes the way you interact -with the layer from the viewer. These modes are accesible via the layer controls -widget top buttons and via shortcuts (pressing a number from `1` to the number of -modes available for the layer). Depending on the layer type, more modes could be -available. Currently, there are two base modes: +with the layer from the viewer. These modes are accessible via the layer controls +widget top buttons and via keyboard shortcuts (these shortcuts will vary depending on the layer type). Currently, there are two base modes: * Pan and zoom ![image: Pan/zoom](../images/pan-zoom-tool.png) From be5ac4b3b0a231bdece8c41a875b1eea5ca0be0b Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Wed, 22 May 2024 13:08:36 -0500 Subject: [PATCH 5/7] Add shortcuts to transform and pan/zoom descriptions --- docs/howtos/layers/shapes.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/howtos/layers/shapes.md b/docs/howtos/layers/shapes.md index ee5031f51..6664f7017 100644 --- a/docs/howtos/layers/shapes.md +++ b/docs/howtos/layers/shapes.md @@ -174,17 +174,18 @@ are used. i.e. You can't remove a vertex before you have created a shape. * **Pan/zoom** ![image: Pan/zoom](../../images/pan-zoom-tool.png) - Use this tool to pan around the image or zoom in. Pan and zoom functionality - is disabled when using the adding and editing tools. Temporarily re-enable pan - and zoom by pressing and holding the spacebar. This feature can be useful if - you want to move around the shapes layer as you edit it. + Use this tool to pan around the layer or zoom in. Pan and zoom functionality + is disabled when using the adding and editing tools. To activate the tool, + you can press `6`. Temporarily re-enable pan and zoom by pressing and holding + the spacebar. This feature can be useful if you want to move around the shapes + layer as you edit it. * **Transform** ![image: Transform](../../images/transform-tool.png) - Use this tool to rotate, scale, or translate the layer. To reset the transformation, - you can Option/Alt-click the transform button (a confirmation dialog will open to - confirm the reset). + Use this tool to rotate, scale, or translate the layer. To activate the tool, + you can press `7`. To reset the transformation, you can Option/Alt-click the + transform button (a confirmation dialog will open to confirm the reset). * **Move to back** ![image: Move to back](../../images/shape-move-to-back.png) From c28832f1e98ff1ecd203e5deff1c982ff6bc98b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Althviz=20Mor=C3=A9?= <16781833+dalthviz@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:08:54 -0500 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com> --- docs/guides/layers.md | 5 +++-- docs/howtos/layers/image.md | 3 ++- docs/howtos/layers/labels.md | 1 + docs/howtos/layers/points.md | 3 ++- docs/howtos/layers/shapes.md | 6 +++--- docs/howtos/layers/surface.md | 2 +- docs/howtos/layers/tracks.md | 2 +- docs/howtos/layers/vectors.md | 2 +- 8 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/guides/layers.md b/docs/guides/layers.md index 3bfc99420..f55b57df9 100644 --- a/docs/guides/layers.md +++ b/docs/guides/layers.md @@ -39,13 +39,14 @@ widget top buttons and via keyboard shortcuts (these shortcuts will vary dependi ![image: Pan/zoom](../images/pan-zoom-tool.png) The `pan_zoom` mode allows you to pan around and zoom in/out the layer. It's -the default mode selected. +the default mode selected. Note: zooming with the mouse-wheel should essentially always work! * Transform ![image: Transform](../images/transform-tool.png) The `transform` mode allows you to translate, rotate, and scale the layer -graphically. To reset the transformation, you can Option/Alt-click the transform +graphically. Note: While you can transform 3D layers, at present this mode is only usable in 2D viewer display mode. +To reset the transformation, you can Option/Alt-click the transform button over the layer controls (a confirmation dialog will open to confirm the reset). diff --git a/docs/howtos/layers/image.md b/docs/howtos/layers/image.md index 788d3e85c..bc2e46fdc 100644 --- a/docs/howtos/layers/image.md +++ b/docs/howtos/layers/image.md @@ -50,7 +50,8 @@ sample image of your choice. to use this mode. * `Transform` ![image: Transform](../../images/transform-tool.png) enables you to - rotate, scale, or translate the layer. To reset the transformation, + rotate, scale, or translate the layer. Note: at present this feature is limited to 2D viewer display mode. + To reset the transformation, you can Option/Alt-click the transform button (a confirmation dialog will open to confirm the reset). Press the `2` key when the layer is selected to use this mode. diff --git a/docs/howtos/layers/labels.md b/docs/howtos/layers/labels.md index 91b09d16a..3710e63de 100644 --- a/docs/howtos/layers/labels.md +++ b/docs/howtos/layers/labels.md @@ -261,6 +261,7 @@ mode by pressing the `6` key when the `labels layer` is selected. This mode is represented by ![image: Transform](../../images/transform-tool.png) in the `layer controls` panel. It enables you to rotate, scale, or translate the layer. +Note: at present this feature is limited to 2D viewer display mode. To reset the transformation, you can Option/Alt-click the transform button (a confirmation dialog will open to confirm the reset). Enable this mode by pressing the `7` key when the `labels layer` is selected. diff --git a/docs/howtos/layers/points.md b/docs/howtos/layers/points.md index da4e694c1..174b53e55 100644 --- a/docs/howtos/layers/points.md +++ b/docs/howtos/layers/points.md @@ -129,7 +129,8 @@ layer: * **Transform** ![image: Transform](../../images/transform-tool.png) - Use this tool to rotate, scale, or translate the layer. To reset the transformation, + Use this tool to rotate, scale, or translate the layer. + Note: at present this feature is limited to 2D viewer display mode. To reset the transformation, you can Option/Alt-click the transform button (a confirmation dialog will open to confirm the reset). Enable this mode by pressing the `5` key when the points layer is selected. diff --git a/docs/howtos/layers/shapes.md b/docs/howtos/layers/shapes.md index 6664f7017..8aa116d1a 100644 --- a/docs/howtos/layers/shapes.md +++ b/docs/howtos/layers/shapes.md @@ -174,8 +174,8 @@ are used. i.e. You can't remove a vertex before you have created a shape. * **Pan/zoom** ![image: Pan/zoom](../../images/pan-zoom-tool.png) - Use this tool to pan around the layer or zoom in. Pan and zoom functionality - is disabled when using the adding and editing tools. To activate the tool, + Use this tool to pan around the layer or zoom in. Pan functionality + is disabled when using the adding and editing tools; however, zoom using the mouse-wheel will typically continue to work. To activate the tool, you can press `6`. Temporarily re-enable pan and zoom by pressing and holding the spacebar. This feature can be useful if you want to move around the shapes layer as you edit it. @@ -183,7 +183,7 @@ are used. i.e. You can't remove a vertex before you have created a shape. * **Transform** ![image: Transform](../../images/transform-tool.png) - Use this tool to rotate, scale, or translate the layer. To activate the tool, + Use this tool to rotate, scale, or translate the layer. Note: at present this feature is limited to 2D viewer display mode. To activate the tool, you can press `7`. To reset the transformation, you can Option/Alt-click the transform button (a confirmation dialog will open to confirm the reset). diff --git a/docs/howtos/layers/surface.md b/docs/howtos/layers/surface.md index 01a601e33..058f7c70a 100644 --- a/docs/howtos/layers/surface.md +++ b/docs/howtos/layers/surface.md @@ -82,7 +82,7 @@ controls are available in the viewer: mode of the layer and supports panning and zooming. Press the `1` key when the layer is selected to use this mode. * Transform - ![image: Transform](../../images/transform-tool.png) enables you to - rotate, scale, or translate the layer. To reset the transformation, you can + rotate, scale, or translate the layer. Note: at present this feature is limited to 2D viewer display mode. To reset the transformation, you can Option/Alt-click the transform button (a confirmation dialog will open to confirm the reset). Press the `2` key when the layer is selected to use this mode. * **Controls** diff --git a/docs/howtos/layers/tracks.md b/docs/howtos/layers/tracks.md index 5066f4b75..8a1397646 100644 --- a/docs/howtos/layers/tracks.md +++ b/docs/howtos/layers/tracks.md @@ -97,7 +97,7 @@ napari.run() mode of the layer and supports panning and zooming. Press the `1` key when the layer is selected to use this mode. * Transform - ![image: Transform](../../images/transform-tool.png) enables you to - rotate, scale, or translate the layer. To reset the transformation, you can + rotate, scale, or translate the layer. Note: at present this feature is limited to 2D viewer display mode. To reset the transformation, you can Option/Alt-click the transform button (a confirmation dialog will open to confirm the reset). Press the `2` key when the layer is selected to use this mode. * **Controls** diff --git a/docs/howtos/layers/vectors.md b/docs/howtos/layers/vectors.md index 451ca319d..e4c6a781d 100644 --- a/docs/howtos/layers/vectors.md +++ b/docs/howtos/layers/vectors.md @@ -90,7 +90,7 @@ first, then explore the editing options the GUI provides. mode of the layer and supports panning and zooming. Press the `1` key when the layer is selected to use this mode. * Transform - ![image: Transform](../../images/transform-tool.png) enables you to - rotate, scale, or translate the layer. To reset the transformation, you can + rotate, scale, or translate the layer. Note: at present this feature is limited to 2D viewer display mode. To reset the transformation, you can Option/Alt-click the transform button (a confirmation dialog will open to confirm the reset). Press the `2` key when the layer is selected to use this mode. * **Controls** From e0996b586c8fd87fa31697722b0dea4b6ae5d175 Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:16:30 -0500 Subject: [PATCH 7/7] Update pan-zoom tool image --- docs/images/pan-zoom-tool.png | Bin 1423 -> 547 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/images/pan-zoom-tool.png b/docs/images/pan-zoom-tool.png index 01bdbb9b6396ec5d76b61277ee976524f449296c..075fa86e992d6b3c5585e7235eeabf5b5dc380ad 100644 GIT binary patch delta 519 zcmV+i0{H!p3!?-fiBL{Q4GJ0x0000DNk~Le0000Z0000Z2nGNE03O-1S&<VGd00Fp3L_t(oN9~tCO9L?&hy7}9I!PT=Tq7hMDeHys=VadUPM{5QCX z;9?a=#qSgQoTUB|b8p++9iGtPfpG67zo*HY!p+RibzEDR%9Ihx%rClyrLJ39>$%nS ztwvyNGRO+D2Lv*_lvmLyczw-= z|05G06I-uGVI7lR`&y0(REVb38lgUrvDRvDU{7nVwuL1#4w?;FGW=?eLHmM!;#s_V z7McxNGHkz>h@qC6lR~p0T}y^O&|Bu=nbjjPnhn`K6JLAl)|8>yP^p0l=g$l#6#>nL zN-|Z^YzSmp^{LXTk2wE%i*;&&I$-TWWYp*FUo({{qeU_u_XVe)ffqni delta 1402 zcmV-=1%>*f1dj_LiBL{Q4GJ0x0000DNk~Le0000V0000X2nGNE03qIR^VP>f4m)LnkFpEs+yUmnE9L^|mMPJYAgtB#*VVRb)~rjYNVF7-#96-eIvU zUatprkp=_|F+DK97fmSLpXZ)Ag?qKo1H^GSAg3iL@f`=KAlSP{!(pYYv*!AdU}wVem3|% zx!}jG(J_4Y{auXzbWby$XU4l;*@^CBU0VL>XiR%(SIr5h^Rlbte_|<74TCw?cSf_h z^7S{kcHD6k8oq;j#jGsco!?@Q;t-Evd)#6oQBRfI^f=t5Xz|O0cDKi+6__S0kopf98-~%NDCt0m`mY1*1(& zO(DtbPjI*~|Hn8N6Nr-$2Gj^MAzuuWbPvJz}L=Zt{PQe>`) z6UUFBwY7y3o5S)_9PyPEC0_@p;e6j|oTT^+kBnmI`c1aU1K$=(=bZBw%4;^CWATCB zQ$4tFzF&JTe?k&ZWf*7xtsKLKoe^9gxs7|jJ>VUIiHRu&Zjkl9qQ?!`mb|)MZc1zc zlhZNWpLob%@@Q|}i#Bo~z;#p68C<$Lgkg%$K>t~MIygX*rV)+J(*dPc-wD>St;}sm z#A__MpNy^v*62Bt<0Rxtu?i-i{Vlt9;q!|hU{7Nse}=xjjhlDI^ieIMV`E#H+mMAm zl1TcW%A_^BRcg7(b)tCE|AnO`Ois;UH(CGIu_Jm-?9seFibW9x&de)vu8_qnqd1b; zm#v5UT0WZW$I1REAG5FSY(Nhu#K*qJ9?c;~?nnSm=amg)1(2Hsg8?ioEa38$A>1bc zd*42Re~$g_6rWW+??ly{3tSQar(iL@jH}m%arvtu{I$5CttkhG^YwB|iC)H}Wg)%? z#;Fk_x5n_~>4HA}R2#Lu8@QwmAmmW4^qwZY6~er%3B+NfzP89A-ktBq$no`gBU}=# zeUa#NBEF>3X>lB!S#8H;Tty>fYciqqN)pM`P|Bt;UjJwy