Jump to content

Measurement Ruler on Image um units


Recommended Posts

We use a Microscope to take pictures and I would like to draw a ruler on the image so that it can be documented at a particular scale.

Is there a plugin that will allow me to do this?

 

I have seen a few older posts on this but no definitive answers beyond the status bar.

 

Centimeters are obviously too big with uM units.

 

So two questions:

1) Ability to draw a ruler on the image reflecting the distance from a to b

2) Ability to change units of ruler to be um micro meters.

 

Worst case if we can only get #1 then we can work out the actual value on a calculator form centimeters.

 

Thanks for your time.

Kurt

Link to post
Share on other sites

EDIT: The finished plugin can be found here:

https://forums.getpaint.net/topic/107652-ruler-v10-march-12-2016/

 

 

I'd be willing to whip up something for you.

Try this out and see if it's more or less what you need.
<Download removed>
 
ruler-ui2.png . ruler-ex.png
 
It's pretty simple.

Edited by toe_head2001
  • Upvote 5
Link to post
Share on other sites

Thank you so very much for putting this together and so quickly.

 - I downloaded the zip file and copied it into my effects folder, but I am not seeing it listed under Effects.

I have version 3.5.4.3708.31975. Is that a problem?

That is the current version that is available to us to install - I am working on getting the latest deployed but at present that is what I have.

 

This is awesome - to go forward - what I am looking for is something like Eli posted.

For example in the picture you posted above, if the ruler could be below one of the boats and have a measurement above it to reflect the exact measurement of the boat itself.

That is what I am after.

 

Again thank you so much for jumping on this - it is really awesome.

Thanks again,

Kurt

Link to post
Share on other sites

... I am not seeing it listed under Effects.

I have version 3.5.4.3708.31975. Is that a problem?

That is the current version that is available to us to install - I am working on getting the latest deployed but at present that is what I have.

Yes, the plugin only works with paint.net v4.0.9+

Is your upcoming upgrade to paint.net v4 a sure thing, or do you have to convince some system administrator?

 

Like this? Just make a selection beneath the boat before running the plugin.

boat.jpg

 

Here's that updated build I forgot to post last night.

--- Download Removed. See below ---

Edited by toe_head2001
Link to post
Share on other sites

This is a really useful idea for a plugin!
Many thanks kcharney and toe_head2001 (looks good!)

Requests:
1. Could 'Marker Sub-units' go higher. For example, if using feet then 12ths (inches) would be more logical. If using inches then up to 1/32 could be useful.
2. Could 'Ruler Max' be a double in the Sub-units specified? So it would be possible to make a ruler say 3feet 4 inches long. Perhaps a double slider with a checkbox to restrict to int values could work.
3. Using Primary and Secondary color values instead of black and white could make it more versatile too...e.g. for a transparent background change secondary opacity before running it.
4. 'Render' SubMenu eventually? - (E.E.R, TR and myself often use the SubMenuName "Test" to keep things tidy at concept stage). ;)

 

Red ochre Plugin pack............................................................... Diabolical Drawings

 

PdnForumSig2.jpg

Link to post
Share on other sites

Requests:

1. 32nds? That's some precision. Are you measuring drill bits or something? :P But I don't see why not.

2. This is the one time I hate the imperial unit system. The (um/mm/cm)meter units just use base 10, end of story. I'll have to write special code for each imperial unit. I'll try it.

    It would look like this, no?

sub-feet.png

3. Sure, but I'm going to have a Checkbox to force black and white; checked by default. I feel that's what most people will want to use in most cases.

4. I'll use the Test submenu in the future.

 

 

I'll work on this again tonight.

Link to post
Share on other sites

1. Perhaps 32 sub divisions is too much? Twelfths (for feet and inches) will be useful. Inches seem to be subdivided into 16ths on rulers quite commonly too.

2. Yes, imperial units can be a pain but feet and inches are still easier to visualize on a human scale for most people, I think.

Personally I wouldn't bother showing the half inch marks as numbers, just a longer marker as used at the quarter inch points.

3 & 4. Sounds good.

Certainly easier than photographing a real ruler with a real object to show scale. Enough problems with depth of field already!

x4w546e.png

Many thanks!

 

Red ochre Plugin pack............................................................... Diabolical Drawings

 

PdnForumSig2.jpg

Link to post
Share on other sites

Getting new stuff installed here can take some time.

I will set up a test environment - but for now I am stuck with 3.5.4 for at least the next several months.

In order to install software it has to be packaged and installed from a central install system.

 

Fun fun...

 

If it will not work until 4.09 I totally understand as this is older.

If it can work partially with 3.5.4 awesome - that will get us kicking...

Then more room to push to version 4.

 

Again thanks so very much.

 

In response to your ruler question - yes that is more what I am looking for - a ruler to measure a specific object in the image.

Be great if it had text above it to state the exact measure amount.

 

Thanks so much.

Kurt

Link to post
Share on other sites
Link to post
Share on other sites

I will set up a test environment - but for now I am stuck with 3.5.4 for at least the next several months.

 

Since you're such a nice guy, I installed 3.5.4 on a VM and built the plugin with that. You should be able to use it now.

 

--- Download removed. See below. ---

 

cell.png

 

2. Could 'Ruler Max' be a double in the Sub-units specified? So it would be possible to make a ruler say 3feet 4 inches long. Perhaps a double slider with a checkbox to restrict to int values could work.

 

What do you think of doing like this?

Hidden Content:
max-fraction.png
Edited by toe_head2001
  • Upvote 1
Link to post
Share on other sites

My goodness - I can't believe it - thank you so VERY VERY much for taking that time out.

I am pushing for 4 to get installed - but with the version increase they need to re-review the EULA. fun fun....

 

this is awesome - I am really impressed - fantastic work....

 

Thanks so very much. :D :D :D :D

 

Beautiful work.

When you finish - I think the folder should be Measurement and the tool called Ruler Tool

 

Thanks again.

Kurt

Link to post
Share on other sites

Could you make the dialog non-Modal.

I am seeing the workflow as a user creating a new layer

Then launching the Ruler

With the dialog open, there is no way to move the ruler under the desired image to ensure that the measurement it exact.

Then after the dialog is closed, there is no way to get back to that dialog for that ruler.

 

so if it were non-Modal, then the user could create a new layer, launch the ruler effect and then move the layer to the correct position under the specific image and then adjust the settings.

 

again - I appreciate this so very very much.

You are amazing.

Thanks again,

Kurt

Link to post
Share on other sites

Here's another update.
This adds an icon for the plugin.
To avoid clipping, the total length string will now be reduced when the ruler width is too small. "Total Length: ## ft" ----> "Length: ## ft" ----> "## ft"

In addition to the half-way sub-units marker, there are also now quarter sub-unit markers.

It also has Red ochre's request for using Fractions in the Ruler Max (ex: 3ft 4 in)
(I hope you like this approach, because it took the least amount of code :P. I also feel it's more intuitive.)
ruler-40in-ui.pngruler-40in.png

 

When you finish - I think the folder should be Measurement ...

 

I'm sorry, but no other plugins are using the submenu, so I'm not going to add that submenu just for this one plugin.

 

  • Upvote 1
Link to post
Share on other sites

Some of the Ruler Max (int) and (fraction) combinations seem a little 'quirky' but it works fine!. ;)
(6 + 12/8ths = seven and a half).

Could the "Total Length:**-****" text be optional (another checkbox)? - again not a problem, easy enough to cut if not needed.

Thanks for this Toe_head, very useful. :beer:

& Midora,
in the U.K. we can buy cloth from the roll in metres, trouble is the looms often still make it one yard wide! :/
Metric is official but speed limits are in m.p.h, petrol(gas) is sold in litres but beer still comes in pints (thank God!)
S.I. is best for scientific calculation but feet and inches are practical for everyday measurements, centimetres are not S.I. units, millimetres are too small and metres too big.
Horses are measured in 'hands' ... I always thought 'hooves' would be more apt. :D

  • Upvote 1

 

Red ochre Plugin pack............................................................... Diabolical Drawings

 

PdnForumSig2.jpg

Link to post
Share on other sites

It's so funny that you US guys still use inch, feet, and miles ;-)

Will this ever change?

 

The metric system is taught in Elementary (primary) School, so we all understand it. However, since the imperial system is so dominant here, we all tend to think in terms of imperial units.

 

For example, if someone were to ask to approximate the distance between two places, I would approximate it in miles, and then convert that to kilometers.

 

Some of the Ruler Max (int) and (fraction) combinations seem a little 'quirky' but it works fine!. ;)

(6 + 12/8ths = seven and a half).

Could the "Total Length:**-****" text be optional (another checkbox)? - again not a problem, easy enough to cut if not needed.

 

Improper fractions are an unfortunate side effect of using IndirectUI, as it doesn't allow the kind of dynamic UI changes we would need to have. (I know you know that, just stating it for others)

 

I will add a check box the the "Total Length" string. Good idea.

  • Upvote 1
Link to post
Share on other sites

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to post
Share on other sites

I better stop. Toe_head2001 will have some difficult getting some input for the Measurement Ruler effect from this conversation.  :)

 

Good idea. Here's my input:

 

Switching from one unit to another, especially from inch to centimeter and vice versa should result in a switch of the Sub-units to a usefull value. Centimeters with 8 Sub-units makes no sense.

Edited by IRON67
Link to post
Share on other sites

This will most likely be the last Test build, so if you have any request or suggestions, now is the time.
 
This adds a few things:
- The "Total Length: ##" text is now optional
- The "Total Length: ##" text is now crisper in appearance
- You can now have the ruler at either the top or the bottom of the selection. The sub-markers will face inwards (toward the center of the selection) in both cases.
- I added options for Yards and Decimeters (Do people use decimeters very much? I've never really seen them, but I live in the USA)
 
--- Download removed ---
 

Switching from one unit to another, especially from inch to centimeter and vice versa should result in a switch of the Sub-units to a useful value. Centimeters with 8 Sub-units makes no sense.

 
I agree, but since I'm using IndirectUI, I can not make the interface do that.
Writing a custom UI is not hard, but it's very time consuming and not worth the effort.

Edited by toe_head2001
Link to post
Share on other sites
  • 3 years later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...