Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/configuration_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ https://volview.kitware.com/?urls=[https://example.com/data.nrrd,https://example

## View Layouts

Define one or more named layouts using the `layouts` key. VolView will use the first layout as the default. Each named layout will be in the layout selector menu. Layout are specified in three formats:
Define one or more named layouts using the `layouts` key. VolView will use the first layout as the default, unless a session file opened alongside the config restores its own layout. Each named layout will be in the layout selector menu. Layout are specified in three formats:

### 1. Grid with View Types (2D String Array)

Expand Down
2 changes: 1 addition & 1 deletion docs/toolbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Layout

Use the layout button to choose between window arrangements. Each view can display a different dataset. Use the view type switcher dropdown in each view to change between 2D slice, 3D volume, or oblique views. Double-click a view to maximize it.
Use the layout button to choose between window arrangements. Picking a named layout or a grid starts over with new views showing the current image, so earlier view settings such as slice and zoom are not kept. Each view can display a different dataset. Use the view type switcher dropdown in each view to change between 2D slice, 3D volume, or oblique views. Use the View actions button beside the view type selector to maximize or restore that view, or to split it side by side or top and bottom. You can split again to add more views within the same area. The new view starts with the same image and view settings. Standard slice and camera settings can be adjusted independently; window/level remains synchronized. Oblique views share their slice center and plane orientation. Close view removes a pane and expands its neighbor; at least one view stays open. Empty views and cine views also have this button. In a narrow view, the view type choices move into the View actions menu. Split actions remain visible but are disabled when the resulting panes would be too small to use; hover or focus the disabled action to see why. Double-clicking a view also maximizes or restores it. Drag a view's grip onto another view to move it, or drag the line between views to resize them.

![Layout](./assets/07-volview-layout-notes.jpg)

Expand Down
26 changes: 23 additions & 3 deletions src/components/CineViewerOverlay.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
<script setup lang="ts">
import { toRefs, computed } from 'vue';
import { toRefs, computed, useTemplateRef } from 'vue';
import ViewOverlayGrid from '@/src/components/ViewOverlayGrid.vue';
import { Maybe } from '@/src/types';
import { useCineFrame } from '@/src/composables/useCineFrame';
import DicomQuickInfoButton from '@/src/components/DicomQuickInfoButton.vue';
import { useImage } from '@/src/composables/useCurrentImage';
import { useNarrowPane } from '@/src/composables/useNarrowPane';
import ViewLayoutActions from '@/src/components/ViewLayoutActions.vue';
import ViewMoveHandle from '@/src/components/ViewMoveHandle.vue';
import PlayControls from '@/src/components/PlayControls.vue';

// The narrowest pane, in pixels, that fits the labeled play controls, View
// actions and move handle on one row.
const FULL_ROW_PANE_WIDTH = 176;

type Props = {
viewId: string;
imageId: Maybe<string>;
Expand All @@ -18,6 +25,8 @@ const { viewId, imageId } = toRefs(props);
const { metadata } = useImage(imageId);
const { frame, frameRange } = useCineFrame(viewId, imageId);
const frameCount = computed(() => frameRange.value[1] + 1);
const controls = useTemplateRef<HTMLElement>('controls');
const compact = useNarrowPane(controls, FULL_ROW_PANE_WIDTH);
</script>

<template>
Expand All @@ -42,8 +51,19 @@ const frameCount = computed(() => frameRange.value[1] + 1);
</div>
</template>
<template #bottom-right>
<div class="annotation-cell" @click.stop>
<play-controls :view-id="viewId" :image-id="imageId" />
<div
ref="controls"
class="annotation-cell d-flex align-center justify-end"
@click.stop
@dblclick.stop
>
<play-controls
:view-id="viewId"
:image-id="imageId"
:compact="compact"
/>
<ViewLayoutActions :view-id="viewId" />
<ViewMoveHandle :view-id="viewId" />
</div>
</template>
</view-overlay-grid>
Expand Down
Loading
Loading