kcharney Posted March 3, 2016 Share Posted March 3, 2016 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 comment Share on other sites More sharing options...
toe_head2001 Posted March 3, 2016 Share Posted March 3, 2016 (edited) 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> . It's pretty simple. Edited April 20, 2020 by toe_head2001 5 My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Eli Posted March 4, 2016 Share Posted March 4, 2016 (edited) Thanks toe_head_2001, A useful and interesting effect. I would like to see the final result with all the the dings and bells. Edited March 4, 2016 by Eli Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 4, 2016 Share Posted March 4, 2016 Added an option for adjustable sub-unit markers. As made the labels stay at the bottom of the ruler when adjusting the height. To Scale (3/4 in, or 6/8 as seen in image) Not to scale. . . My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
kcharney Posted March 4, 2016 Author Share Posted March 4, 2016 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 comment Share on other sites More sharing options...
toe_head2001 Posted March 4, 2016 Share Posted March 4, 2016 (edited) ... 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. Here's that updated build I forgot to post last night. --- Download Removed. See below --- Edited March 5, 2016 by toe_head2001 My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Red ochre Posted March 4, 2016 Share Posted March 4, 2016 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 ................Real Paintings Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 4, 2016 Share Posted March 4, 2016 Requests: 1. 32nds? That's some precision. Are you measuring drill bits or something? 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? 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. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Red ochre Posted March 4, 2016 Share Posted March 4, 2016 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! Many thanks! Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
kcharney Posted March 4, 2016 Author Share Posted March 4, 2016 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 comment Share on other sites More sharing options...
Ego Eram Reputo Posted March 5, 2016 Share Posted March 5, 2016 Seen this Measure Selection and this Measure Object? ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 5, 2016 Share Posted March 5, 2016 (edited) 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. --- 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: Edited March 8, 2016 by toe_head2001 1 My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
kcharney Posted March 7, 2016 Author Share Posted March 7, 2016 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 Beautiful work. When you finish - I think the folder should be Measurement and the tool called Ruler Tool Thanks again. Kurt Link to comment Share on other sites More sharing options...
kcharney Posted March 7, 2016 Author Share Posted March 7, 2016 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 comment Share on other sites More sharing options...
BoltBait Posted March 7, 2016 Share Posted March 7, 2016 Could you make the dialog non-Modal. That's not how the effect system works. Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 7, 2016 Share Posted March 7, 2016 With the dialog open, there is no way to move the ruler under the desired image to ensure that the measurement it exact. You need to make selection before running the plugin. This will give you a precise ruler placement. -----> My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 7, 2016 Share Posted March 7, 2016 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 . I also feel it's more intuitive.) 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. 1 My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
midora Posted March 7, 2016 Share Posted March 7, 2016 It's so funny that you US guys still use inch, feet, and miles ;-) Will this ever change? Thanks for the plugin. Link to comment Share on other sites More sharing options...
Red ochre Posted March 8, 2016 Share Posted March 8, 2016 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. & 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. 1 Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 8, 2016 Share Posted March 8, 2016 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. 1 My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
david.atwell Posted March 9, 2016 Share Posted March 9, 2016 Split out offtopic discussion to http://forums.getpaint.net/index.php?/topic/107639-metric-vs-imperial-life-vs-science/ . 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 comment Share on other sites More sharing options...
IRON67 Posted March 9, 2016 Share Posted March 9, 2016 (edited) 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 March 9, 2016 by IRON67 Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 10, 2016 Share Posted March 10, 2016 (edited) 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 March 13, 2016 by toe_head2001 My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
killercrew Posted August 30, 2019 Share Posted August 30, 2019 Cant find any download link to the ruler? Can someone post the link? Thanks Link to comment Share on other sites More sharing options...
toe_head2001 Posted August 30, 2019 Share Posted August 30, 2019 16 minutes ago, killercrew said: Cant find any download link to the ruler? Can someone post the link? Thanks The plugin was released here: https://forums.getpaint.net/topic/107652-ruler-v10-march-12-2016/ My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Recommended Posts