View in #cornerstone3d on Slack
@Christopher_Nagy: Hi, I am trying to keep track of the viewport.viewportStatus
. I need to access the number of slices, and for that (as far as I understood) the status needs to be “ready”. However, I didn’t find any way to know when that is the case. Is there any event I can subscribe to that tells me when a viewport (or all viewports) are ready?
@Julian_Linares: If you need number of slices I assume we are talking about viewports that do have an image/stack/volume assigned. In my case I used getNumberOfSlices() in the listener of “CORNERSTONE_IMAGE_RENDERED” and never got an error.
@Christopher_Nagy: I will try that out, thanks!
Which object do you subscribe to? Is it eventTarget
? Because if I use that, the event is never fired…
@Julian_Linares: To the HTML element