Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Sequences can be built in 3D, but errors are reported when MPR reconstruction is performed, I wonder why they happen? #1619

Open
woaihengniu opened this issue Nov 26, 2024 · 2 comments

Comments

@woaihengniu
Copy link

woaihengniu commented Nov 26, 2024

Describe the Bug

Sequences can be built in 3D Volume Rendering, but errors are reported when mpr reconstruction is performed, I wonder why they happen?
6P%BUHG BT5SB4LX4Q3KNQ
VCF4(G9M5IZL(LW$LR(FI6N

Steps to Reproduce

  1. Initialize components
  2. Load the image
  3. Render the image

The current behavior

Failed to build the MPR

The expected behavior

The MPR was built successfully.

OS

win10

Node version

v18.20.4

Browser

Microsoft Edge 128.0.2739.79

Copy link
Member

sedghi commented Dec 2, 2024

This is not enough information, can you give reproducible steps with anonymized data please?

@woaihengniu
Copy link
Author

This is not enough information, can you give reproducible steps with anonymized data please?

This is the data
let imageIds=ref(["wadouri:http://60.205.216.219:82/20211125\0029C381.img", "wadouri:http://60.205.216.219:82/20211125\0029C38C.img", "wadouri:http://60.205.216.219:82/20211125\0029C395.img", "wadouri:http://60.205.216.219:82/20211125\0029C396.img", "wadouri:http://60.205.216.219:82/20211125\0029C397.img", "wadouri:http://60.205.216.219:82/20211125\0029C398.img", "wadouri:http://60.205.216.219:82/20211125\0029C399.img", "wadouri:http://60.205.216.219:82/20211125\0029C39A.img", "wadouri:http://60.205.216.219:82/20211125\0029C39B.img", "wadouri:http://60.205.216.219:82/20211125\0029C377.img", "wadouri:http://60.205.216.219:82/20211125\0029C378.img", "wadouri:http://60.205.216.219:82/20211125\0029C379.img", "wadouri:http://60.205.216.219:82/20211125\0029C37A.img", "wadouri:http://60.205.216.219:82/20211125\0029C37B.img", "wadouri:http://60.205.216.219:82/20211125\0029C37C.img", "wadouri:http://60.205.216.219:82/20211125\0029C37D.img", "wadouri:http://60.205.216.219:82/20211125\0029C37E.img", "wadouri:http://60.205.216.219:82/20211125\0029C37F.img", "wadouri:http://60.205.216.219:82/20211125\0029C380.img", "wadouri:http://60.205.216.219:82/20211125\0029C382.img", "wadouri:http://60.205.216.219:82/20211125\0029C383.img", "wadouri:http://60.205.216.219:82/20211125\0029C384.img", "wadouri:http://60.205.216.219:82/20211125\0029C385.img", "wadouri:http://60.205.216.219:82/20211125\0029C386.img", "wadouri:http://60.205.216.219:82/20211125\0029C387.img", "wadouri:http://60.205.216.219:82/20211125\0029C388.img", "wadouri:http://60.205.216.219:82/20211125\0029C389.img", "wadouri:http://60.205.216.219:82/20211125\0029C38A.img", "wadouri:http://60.205.216.219:82/20211125\0029C38B.img", "wadouri:http://60.205.216.219:82/20211125\0029C38D.img", "wadouri:http://60.205.216.219:82/20211125\0029C38E.img", "wadouri:http://60.205.216.219:82/20211125\0029C38F.img", "wadouri:http://60.205.216.219:82/20211125\0029C390.img", "wadouri:http://60.205.216.219:82/20211125\0029C391.img", "wadouri:http://60.205.216.219:82/20211125\0029C392.img", "wadouri:http://60.205.216.219:82/20211125\0029C394.img", "wadouri:http://60.205.216.219:82/20211125\0029C393.img"]);
This is the render MPR method
async function loadDcm () {
await initcornerstone();
try {
let dcm1_container = document.getElementById('dcm1');
let dcm2_container = document.getElementById('dcm2');
let dcm3_container = document.getElementById('dcm3');
element1 = document.createElement('div');
element2 = document.createElement('div');
element3 = document.createElement('div');
element1.style.width = elemet1Style.width;
element1.style.height = elemet1Style.height;
element2.style.width = elemet2Style.width;
element2.style.height = elemet2Style.height;
element3.style.width = elemet3Style.width;
element3.style.height = elemet3Style.height;
element1.oncontextmenu = (e) => e.preventDefault();
element2.oncontextmenu = (e) => e.preventDefault();
element3.oncontextmenu = (e) => e.preventDefault();
dcm1_container.appendChild(element1);
dcm2_container.appendChild(element2);
dcm3_container.appendChild(element3);
renderingEngine = new RenderingEngine(renderingEngineId);
volume = await volumeLoader.createAndCacheVolume(volumeId, {
imageIds: imageIds.value,
});
const viewportInputArray = [
{
viewportId: viewportId1.value,
element: element1,
type: ViewportType.ORTHOGRAPHIC,
defaultOptions: {
orientation: viewport_orientation[0],
},
},
{
viewportId: viewportId2.value,
element: element2,
type: ViewportType.ORTHOGRAPHIC,
defaultOptions: {
orientation: viewport_orientation[1],
},
},
{
viewportId: viewportId3.value,
element: element3,
type: ViewportType.ORTHOGRAPHIC,
defaultOptions: {
orientation: viewport_orientation[2],
},
},
];
renderingEngine.setViewports(viewportInputArray);
await volume.load();
await setVolumesForViewports(
renderingEngine,
[{ volumeId }],
viewportIds, true
)
renderingEngine.renderViewports(viewportIds);
}

This is how you render 3D
async function run () {
const content = document.getElementById('container');
const viewportGrid = document.createElement('div');
element1 = document.createElement('div');
element1.oncontextmenu = () => false;
element1.style.width = width.value + 'px';
element1.style.height = height.value + 'px';
viewportGrid.appendChild(element1);
content.appendChild(viewportGrid);
await initcornerstone();
renderingEngine = new RenderingEngine(renderingEngineId);
const viewportInputArray = [
{
viewportId: viewportId,
type: ViewportType.VOLUME_3D,
element: element1,
defaultOptions: {
orientation: Enums.OrientationAxis.CORONAL,
background: CONSTANTS.BACKGROUND_COLORS.slicer3D,
},
},
];
renderingEngine.setViewports(viewportInputArray);
volume = await volumeLoader.createAndCacheVolume(volumeId, {
imageIds: imageIds.value,
});
toolGroup3d.addViewport(viewportId, renderingEngineId);
volume.load();
viewport = renderingEngine.getViewport(viewportId);
await setVolumesForViewports(
renderingEngine,
[{ volumeId }],
[viewportId]
).then(() => {
viewport.setProperties({ preset: 'CT-Bone' });
viewport.render();
})
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants