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] When I create labelmap segmentation, the image will automatically jump to the center #1451

Open
IrvingLu opened this issue Sep 3, 2024 · 7 comments

Comments

@IrvingLu
Copy link

IrvingLu commented Sep 3, 2024

Describe the Bug

When I create label segmentation, the image will automatically jump to the center,I think it's correct for the image to stay at the current layer。
Contour type segmentation does not have this situation

Steps to Reproduce

1、Image flipping
2、Create Labelmap Segmentation
await volumeLoader.createAndCacheDerivedSegmentationVolume(
primaryMprVolumeId,
{
volumeId: segmentationId,
}
);
segmentation.addSegmentations([
{
segmentationId,
representation: {
type: csToolsEnums.SegmentationRepresentations.Labelmap,
data: {
volumeId: segmentationId,
},
},
},
]);
const representationIds = await segmentation.addSegmentationRepresentations(
mprToolGroupId,
[
{
segmentationId: segmentationId,
type: csToolsEnums.SegmentationRepresentations.Labelmap,
},
]
);

The current behavior

The image will automatically jump to the center。

The expected behavior

The image stays at the current layer

OS

windows10

Node version

1.61.5

Browser

Chrome

@IrvingLu
Copy link
Author

IrvingLu commented Sep 3, 2024

20240903165211_rec_

@IrvingLu IrvingLu changed the title [Bug] When I create label segmentation, the image will automatically jump to the center [Bug] When I create labelmap segmentation, the image will automatically jump to the center Sep 4, 2024
@sedghi
Copy link
Member

sedghi commented Sep 13, 2024

It is because it switch to volume viewport, we are working to fix it in cornerstone3D 2.0

@SooyoonJi
Copy link

how can I prevent it? (it means prevent to go center)
is there any cheat or something?

@IrvingLu
Copy link
Author

how can I prevent it? (it means prevent to go center) is there any cheat or something?

Remember it, then jump back

@SooyoonJi
Copy link

how can I prevent it? (it means prevent to go center) is there any cheat or something?

Remember it, then jump back

I am curious about the timing of back it to the center.
When should I jump back?
After the SEGMENTION_REPENSION_MODIFIED event is triggered? or anything else?

@IrvingLu
Copy link
Author

I am curious about the timing of back it to the center.
When should I jump back?
After the SEGMENTION_REPENSION_MODIFIED event is triggered? or anything else?

I think you don't need to dwell on this issue, CS3D will help you handle it in version 2.0.
After the SEGMENTION_REPENSION_MODIFIED event is triggered,It's the right approach

@SooyoonJi
Copy link

I am curious about the timing of back it to the center.
When should I jump back?
After the SEGMENTION_REPENSION_MODIFIED event is triggered? or anything else?

I think you don't need to dwell on this issue, CS3D will help you handle it in version 2.0. After the SEGMENTION_REPENSION_MODIFIED event is triggered,It's the right approach

I need a temporary solution right now before the coronerstone3D 2.0 version release.
I handled it in CAMERA_RESET event hanlder.
Thanks for your tips 🙂

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

3 participants