Open m00n620 opened 8 months ago
I tried to reproduce it but can't, can you please add more details or ideally more code?
This is our custom hanging protocol. We are turn this on/off using toggleHangingProtocol
like MPR.
export const mip: Types.HangingProtocol.Protocol = {
id: 'mip',
name: 'mip',
imageLoadStrategy: 'nth',
protocolMatchingRules: [],
callbacks: {
// Switches out of MIP mode when the layout change button is used
onLayoutChange: [
{
commandName: 'toggleHangingProtocol',
commandOptions: { protocolId: 'mip' },
context: 'DEFAULT',
},
],
// Turns off crosshairs when switching out of MPR mode
// onProtocolExit: [
// {
// commandName: 'cleanUpCrosshairs',
// },
// ],
},
displaySetSelectors: {
activeDisplaySet: {
seriesMatchingRules: [
{
weight: 1,
attribute: 'isReconstructable',
constraint: {
equals: {
value: true,
},
},
required: true,
},
],
},
},
stages: [
{
name: '2D MIP',
viewportStructure: {
layoutType: 'grid',
properties: {
rows: 1,
columns: 2,
layoutOptions: [
{
x: 0,
y: 0,
width: 1 / 2,
height: 1,
},
{
x: 1 / 2,
y: 0,
width: 1 / 2,
height: 1,
},
],
},
},
viewports: [
{
viewportOptions: {
toolGroupId: 'mip',
viewportType: 'volume',
initialImageOptions: {
preset: 'middle',
},
syncGroups: [
{
type: 'cameraPosition',
id: 'mip-sync-cameraPosition',
source: true,
target: true,
},
{
type: 'voi',
id: 'mip-sync-voi',
source: true,
target: true,
},
],
},
displaySets: [
{
id: 'activeDisplaySet',
},
],
},
{
viewportOptions: {
toolGroupId: 'mip',
viewportType: 'volume',
initialImageOptions: {
preset: 'middle',
},
syncGroups: [
{
type: 'cameraPosition',
id: 'mip-sync-cameraPosition',
source: true,
target: true,
},
{
type: 'voi',
id: 'mip-sync-voi',
source: true,
target: true,
},
],
},
displaySets: [
{
id: 'activeDisplaySet',
options: {
blendMode: 'MIP',
slabThickness: 5,
},
},
],
},
],
},
],
};
seems like when we are storing the presentations, it does it one by one and by the time that we store the first (left) viewport, the left viewport gets a new displayset and the synchronizer try to sync the right (old layout) camera with the new display set(left), and as a result an incorrect presentation will get saved for the right viewport at the exit
@sedghi , can you please share the timeline for this bug?
Can you check the latest OHIF viewer, which now includes Cornerstone 3D 2.0?
Here are the migration guides:
Try OHIF locally: https://viewer-dev.ohif.org/localbasic
Try Cornerstone3D 2.0 locally: https://www.cornerstonejs.org/live-examples/local.html
Describe the Bug
cameraPosition
synchronizing is not working, series are super zoomed in custom hanging protocol.Here's the viewports configuration in custom hanging protocol.
But, if I enable the orientation, everything works correctly.
However, I want to use the protocol for all orientations(axial, coronal and sagittal).
Steps to Reproduce
The current behavior
The viewport loses the zoom level, images are super zoomed when orientation is not specified.
The expected behavior
cameraPosition sync should be working whenever orientation is set or not.
OS
Windows 11
Node version
18.16.0
Browser
Chrome 120.0.6099.217