You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deployments.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,3 +66,51 @@ jupyter lab
66
66
67
67
If you'd rather interact with remotely hosted notebooks in JupyterLab you can
68
68
also open them in Binder: [](https://mybinder.org/v2/gh/InsightSoftwareConsortium/itkwidgets/main?labpath=examples%2F)
69
+
70
+
## Command Line (CLI)
71
+
72
+
To enable quick inspection of your 3D data in the browser or in your terminal you can install the command-line tool.
73
+
74
+
```bash
75
+
pip install 'itkwidgets[cli]>=1.0a35'
76
+
playwright install --with-deps chromium
77
+
```
78
+
Previewing data in the terminal requires support for the iterm2 inline image protocol. Examples of terminals with this support include [wezterm](https://wezfurlong.org/wezterm/), [VSCode's Terminal](https://code.visualstudio.com/updates/v1_80#_image-support) (with VSCode >= v1.80), and [iTerm2](https://iterm2.com/index.html).
79
+
80
+
**Note**: If you are using VSCode but are not seeing the images output in the terminal confirm that you are on version `1.80` or later. You may also need to make sure that `Integrated: Gpu Acceleration` is set to `on` rather than `auto`. Find this under `File > Preferences > Settings` and search for `Gpu Acceleration`.
81
+
82
+
For basic usage the following flags are most commonly used:
83
+
84
+
**Data Input**
85
+
*`-i, --image`: The path to an image data file. This flag is optional and the image data can also be passed in as the first argument without a flag.
86
+
*`-l, --label-image`: Path to a label image data file
87
+
*`-p, --point-set`: Path to a point set data file
88
+
*`--reader`: Backend to use to read the data file(s) (choices: "ngff_zarr", "zarr", "itk", "tifffile", "imageio")
89
+
90
+
**For use with browser output**
91
+
*`-b, --browser`: Render to a browser tab instead of the terminal.
92
+
*`--repl`: Start interactive REPL after launching viewer. This allows you to programmatically interact with and update the viewer.
93
+
94
+
**For use with terminal or browser output**
95
+
*`--verbose`: Print all log messages to stdout. Defaults to supressing log messages.
96
+
*`-r, --rotate`: Continuously rotate the camera around the scene in volume rendering mode.
97
+
*`-m, --view-mode`: Only relevant for 3D scenes (choices: "x", "y", "z", "v")
98
+
99
+
### Examples
100
+
101
+
View the data in the terminal while rotating the camera:
102
+
```bash
103
+
itkwidgets path/to/data -r
104
+
```
105
+

106
+
107
+
View the image data in the browser and then programatically set the label image:
Copy file name to clipboardExpand all lines: docs/quick_start_guide.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,13 @@ For Google Colab run:
44
44
pip install 'itkwidgets>=1.0a23'
45
45
```
46
46
47
+
### Command Line (CLI)
48
+
49
+
```bash
50
+
pip install 'itkwidgets[cli]>=1.0a35'
51
+
playwright install --with-deps chromium
52
+
```
53
+
47
54
## Example Notebooks
48
55
49
56
Example Notebooks can be accessed locally by cloning the repository:
@@ -60,6 +67,8 @@ cd itkwidgets/examples
60
67
61
68
## Usage
62
69
70
+
### Notebook
71
+
63
72
In Jupyter, import the view function:
64
73
65
74
```python
@@ -78,5 +87,18 @@ For information on additional options, see the view function docstring:
78
87
view?
79
88
```
80
89
81
-
See the [deployments](deployments.md) section for a more detailed overview of additional notebook
82
-
options as well as other ways to run and interact with your notebooks.
90
+
### CLI
91
+
92
+
```bash
93
+
itkwidgets path/to/image -b # open viewer in browser -OR-
94
+
95
+
itkwidgets path/to/image # display preview in terminal
96
+
```
97
+
98
+
For information on additional options, see the help:
99
+
100
+
```bash
101
+
itkwidgets --help
102
+
```
103
+
104
+
See the [deployments](deployments.md) section for a more detailed overview of additional options as well as other ways to run and interact with the itkwidgets.
0 commit comments