Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    MicroscopyRA
    @Svidro
    image.png
    lguerard
    @lguerard
    Hi all again,
    Thanks to @Svidro I'm getting there ! :). Just wanted to know, is there any way to calculate feret diameter in Qupath ?
    I can't find it in the shape features
    MicroscopyRA
    @Svidro
    Haha, I was just asking Pete about that approximately a month ago. The answer is... sort of with a script. This script of his shows how to access the Feret values, similar to in ImageJ... but which position in the array you access determines what you get.
    import qupath.imagej.objects.*
    
    getCellObjects().parallelStream().forEach {
        def ml = it.getMeasurementList()
        def roi = it.getNucleusROI()
        def roiIJ = ROIConverterIJ.convertToIJRoi(roi, 0, 0, 1)
        def angle = roiIJ.getFeretValues()[1]
        ml.putMeasurement('Nucleus angle', angle)
        ml.closeList()
    }
    fireHierarchyUpdate()
    print "done"
    MicroscopyRA
    @Svidro
    image.png
    so [1] was nucleus angle. I altered the script to check positions 0 2 and 3 and got:
    So it looks like feret value in position 3 is the longer axis, but in pixels, not microns
    lguerard
    @lguerard
    Which I can then multiply with the calibration to get it.
    Awesome thanks ! :)
    So that calculation only works on cells ?
    MicroscopyRA
    @Svidro

    Yeah, the calibration would be

    def imageData = getCurrentImageData()
    def server = imageData.getServer()
    def pixelSize = server.getPixelHeightMicrons()

    I used it to get the angle of the nuclei, but you could adjust the getNucleusROI() to getROI(), and the getCellBOjects() to something else

    lguerard
    @lguerard
    And the smallest feret is zero or two ?
    MicroscopyRA
    @Svidro
    Whooops, sorry, still waking up. I don't know what "three" is, but third position would be "two" since the array starts with zero
    And I even got that wrong haha. So Zero is the long axis, and Two is the short axis. I am not sure what Three is.
    lguerard
    @lguerard
    so roiIJ.getFeretValues()[3] is maxFeret ? and [2] min ?
    MicroscopyRA
    @Svidro
    maybe Area?
    lguerard
    @lguerard
    Ahah no worries, so [0] max and [2] min ?
    MicroscopyRA
    @Svidro
    Yes, and 1 is the angle.
    lguerard
    @lguerard
    Awesome thanks.
    MicroscopyRA
    @Svidro
    I chose a reallly elongated cell to make sure
    Ah, looking it up in the IJ help, it is probably the x coordinate of the beginning of the MaxFeret
    Jan Eglinger
    @imagejan

    From the javadoc of ij.gui.Roi:

    getFeretValues
    public double[] getFeretValues()
    Caculates "Feret" (maximum caliper width), "FeretAngle" and "MinFeret" (minimum caliper width), "FeretX" and "FeretY".

    Does that help?
    lguerard
    @lguerard
    Indeed ! Thanks @imagejan :)
    Jan Eglinger
    @imagejan
    https://javadoc.scijava.org is your friend (in case your IDE doesn't support Javadoc lookup internally...) :slight_smile:
    MicroscopyRA
    @Svidro
    Still writing entirely within QuPath ^_^ Sigh.
    Jan Eglinger
    @imagejan
    BTW, it would be great if QuPath would (finally) join the image.sc forum! Discussions like this one might be helpful for other people as well, and would be much easier to find in a (tagged) topic on the forum.
    MicroscopyRA
    @Svidro
    Haha, I think he's getting close to the release of 2.0, which is when he wanted to change everything over. Around the Tri-Con and all.
    I can't wait to get off the Google Group forum... No post editing, and I try do way too much as I am waking up in the morning.
    Pete
    @petebankhead
    @imagejan I was going to ask today, but didn't quite manage it... :) what do I do, post the logo on the thread? Do I need to start a topic there or does saying this to you now count...?
    Aiming for milestone (i.e. less finished that I'd have liked, but nevertheless worthwhile) release within the next few days. To be clear, it will be 0.2.0-m1 - grave misconception to think we're at v1.x.x never mind v2.x.x....
    Pete
    @petebankhead
    (drafting the update to the website I only linked to image.sc as a statement of intent....)
    MicroscopyRA
    @Svidro
    Aww, I just drop the first 0 since it's to the left!
    Pete
    @petebankhead
    Although in reading that, the next one should arguably be v1.0.0-m1 since it is a pretty radical overhaul...
    Hmmmm, now I'm wondering if that is the way to go...
    MicroscopyRA
    @Svidro
    It would certainly ruin my standard practice of ignoring the first digit...
    Pete
    @petebankhead
    Yes, I saw you were propounding the myth for some months now, but I managed to hold my tongue (or typing fingers?)
    MicroscopyRA
    @Svidro
    <-- Not a programmer. But I would accept mythtical.
    Jan Eglinger
    @imagejan
    @petebankhead you can either start your own topic in the forum to make1the process fully transparent (see https://forum.image.sc/t/mib-joins-the-forum/22882 for example), or leave it up to me to add QuPath and announce that I'm doing so (see https://forum.image.sc/t/welcome-deeplabcut-as-new-open-source-software-partner/21265 for example).
    I can do so next week.
    Pete
    @petebankhead
    @imagejan I plan to post anyway as soon as there is something new to download, which is what I envisaged being the 'announcement'. But until then it will be a busy weekend...
    Pete
    @petebankhead
    I've asked! Now I wait...
    Jan Eglinger
    @imagejan
    :tada: :+1:
    MicroscopyRA
    @Svidro
    Yay!
    NicoKiaru
    @NicoKiaru
    Hi all, do you know if there's a way, in a groovy script, to notify qupath (v0.1.2) that a modification has been made to the current image. I noticed that modifying programmatically the class of a detection is not detected by qupath. So qupath do not ask for saving the project when switching from one image to another.
    NicoKiaru
    @NicoKiaru
    ok, that's fireHierarchyUpdate()
    KouWeiBin
    @KouWeiBin
    @all
    hi, all, I am using Qupath software now. And I think it is so wonderful to us who use it to do something about digital pathology. it help me solve so many issues. but now there is problem i can't solve, so can you help me to solve it? my request is listed as follow:
    I have a TMA which contained many people's HE slide with svs format. I want to split it into many single HE slide with svs format which could be zoomed in and zoomed out. I know the TMA function available now can recognize the TMA objects and can dearray them, but can't split them, so can you help me to solve it and give me the patch you will add?
    Pete
    @petebankhead
    Hi @KouWeiBin, glad you find QuPath useful! This Gitter isn't really maintained any more - the best place for questions is http://forum.image.sc/tag/qupath where more people should see and be able to answer.
    KouWeiBin
    @KouWeiBin
    @petebankhead thanks your valuable information. i will jump to the link you offered