diff --git a/doc/content/docs/2dViewer.jpg b/doc/content/docs/2dViewer.jpg new file mode 100644 index 00000000..1255d7bd Binary files /dev/null and b/doc/content/docs/2dViewer.jpg differ diff --git a/doc/content/docs/cli.md b/doc/content/docs/cli.md index d7387dc9..0c8b8d0e 100644 --- a/doc/content/docs/cli.md +++ b/doc/content/docs/cli.md @@ -64,3 +64,10 @@ $ ItkVtkImageViewer -p ``` ![ItkVtkImageViewer](./viewer.jpg) + +### Force 2D viewer + +To force the 2D viewer on 3D dataset, just add `?use2D` at the end of the URL. + +![ItkVtkImageViewer](./2dViewer.jpg) + diff --git a/src/index.js b/src/index.js index f4bc0567..28908f46 100644 --- a/src/index.js +++ b/src/index.js @@ -66,7 +66,7 @@ export function processParameters(container, addOnParameters = {}, keyName = 'fi if (userParams.fullscreen) { helper.applyStyle(myContainer, helper.STYLES.fullScreen); } - return createViewer(myContainer, userParams[keyName]); + return createViewer(myContainer, userParams[keyName], !!userParams.use2D); } return null; }