-
Notifications
You must be signed in to change notification settings - Fork 597
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
How can i display the ruler unit of measurement? #1148
Comments
It should come automatically for all modalities but echography (US). For this one, we need calibration, see #897. |
So what is the code needed to do this? |
I want to put a unit after the number showing, like "150mm" rather than just "150" |
Is it echo (modality: US) or not? |
Imperial system, meters, i didn't understand this question, can explain more? |
Most image modalities (CT, MR...) include pixel spacing in the dicom header. When present, the viewer will use this tag to translate a number of pixels to a distance in mm. For the modality US (echography), this spacing is not present, the viewer cannot do the translation, that's why it does not show a unit next to a measurement. |
If i have this, i cant custom the size of the canvas? |
You can, the viewer will try to fit the data in it as best as it can. |
So, having the PixelSpacing, how do i show the "mm" or "cm"? |
The ruler uses the |
Yes, I’m using the default ruler |
I'm using, |
And it does not work? Does the console say anything? |
The unit is millimeter? |
yes, it should be millimeter. Now I get your problem, you are in a setup similar to the one of dwv-react, no? In these demos, the translation files are not loaded. The quantify method I mentioned above, returns an object with the unit that comes from a translation file, since there is none, it comes back empty. I still need to find an way to includes these translations... All help accepted, if you know how react handles this, I'm interested! |
Yes, is a react project, i'll try too, if i can resolve the problem i'll send to you |
Closing for now, feel free to comment if you need. |
I want to display the ruler unit of measurement when use the Ruler tool, showing alongside the number, how can i do this?
The text was updated successfully, but these errors were encountered: