-
Notifications
You must be signed in to change notification settings - Fork 28
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
Volume information not updated when new volume content is received #47
Comments
Interesting... I did some digging and it looks like this happens in the old version of OpenIGTLinkIF (in 4.8.1) as well. I don't think that updating the scalar range and window/level would be that expensive, but is that necessarily always the desired behaviour (specifically with updating the window/level)? @lassoan @leochan2009 Thoughts? |
Updating the scalar range is considerable amount of time for volumes, but quick for single slices. Also, scalar range is only computed on request (for example, when auto WW/WL needs it or manually changing WW/WL) and cached in vtkImageData (so only recomputed when image data changes). So, we don't need to worry about introducing performance problems by properly calling Modified() events when needed. Something like this should work: https://github.com/Slicer/Slicer/blob/3090483f8cec1e068e4a23d0e7ca3fe627a9cd54/Base/Python/slicer/util.py#L760-L769 |
@Sunderlandkyl you are right this was an issue in 4.8 too, we have tested that too. We were just lucky that usually ultrasound images have a bright line at the transducer rubber, so we got a full range of scalars when we started the connection. This is still a serious issue, because TGC set low on the top of the image, or cropping may result in a totally black initial image. |
Hi Tamas, I think updating the scalar range is not always an desired behavior in OpenIGTLinkIF module, and as it is mentioned by Andras, it will be considerable amount of time for volume data. |
Scalar range is normally NOT computed. It may be computed if auto ww/wl is enabled (but then histogram is computed for as well and that takes much longer than scalar range min/max compute; so scalar range computation should not be an issue) and during manual ww/wl adjustment (you don't normally keep adjusting the ww/wl, so it should not be an issue). |
When an image is received for the first time, mrml node is created and volume information is computed (min max scalar value). The brightness/contrast of volume display is limited by min and max scalar values.
When an image message is received with the same name, the min max scalar values are not updated. So e.g. when the updated image has brighter scalars, those are always white and grayscales cannot be visualized in that range.
How computationally expensive would it be to update the min max scalar values, to reset the thresholds on the brightness/contrast (window/level) sliders in the Volumes module every time the image content is updated by OpenIGTLink?
The text was updated successfully, but these errors were encountered: