Home Image-Pro General Discussions

Is it possible to get median pixel intensity of each counted object?

I see that mean, max, min, and std are available for a segmented object but I would like to extract the median before probing further into segmentation of each object. My images are large multichannel whole slide images with a range of 50-200 objects per Stitched image. I want to extract the median pixel intensity of each object. I use Image Pro Premier 9.3. 

I can provide more background if needed. 

Answers

  • 2022-09-13-111048

    molly_s --

    If by SEGMENTED OBJECT you mean an OBJECT created by a THRESHOLD + COUNT then IMAGE-PRO extracts all of the MEASUREMENTS from the OBJECT at the same time INTERNALLY.  The OBJECT MEASUREMENTS that are shown in the DATA TABLE / MEASUREMENTS TABLE are a SUBSET of the OBJECT MEASUREMENTS that are extracted INTERNALLY.

    Once the COUNT is complete, ALL of the OBJECT MEASUREMENTS for the appropriate OBJECT TYPE (POINT, LINE, REGION) are available to CODE written to work with IMAGE-PRO even if the MEASUREMENT is not selected in the MEASUREMENT TYPE WINDOW and displayed in the DATA TABLE / MEASUREMENTS TABLE.

    I hope this information is helpful.

    -- Matt




  • Thank you, Matt! 
    My answer to this is YES:
    - If by SEGMENTED OBJECT you mean an OBJECT created by a THRESHOLD + COUNT then IMAGE-PRO extracts all of the MEASUREMENTS from the OBJECT at the same time INTERNALLY

    My objects are Regions. They are blood vessels within muscle tissue. How do I access it to code? I tried to create the measure and it did not work for me. I am interested in the distribution of pixel intensity within my vessel region as I believe it is different between groups (diffuse vs. spotty) and MEDIAN pixel intensity within the region will be more informative than average. 

  • 2022-09-13-175544

    molly_s --

    After reading your response and your original question again, I am thinking that you are not asking for CODE to help with this project but just general IMAGE-PRO PROCEDURES which would help you get the measurements you are looking for.

    I have created and attached

        FORUM QUESTION -- 2022-09-13-174738.pdf

    which I hope includes information that will help you in your use of IMAGE-PRO.

    This document was done using IMAGE-PRO V10 but most or all of the FEATURES and FUNCTIONS used and illustrated are in IMAGE-PRO PREMIER 9.3.

    I hope this information is helpful.

    -- Matt


  • Hi Matt, thank you for providing the document. I do know how do extract measurements in that way from the features. But median intensity for EACH is not an option. That is the measure I am interested in. Not mean, max, min or std. I guess I am asking for code, but I have never used code with image pro premier? I wrote a code in matlab to extract median intensity but my lab would prefer I do it in imagepro as that is what they use. 
  • 2022-09-13-175544
    After reading your response and your original question again, I am thinking that you are not asking for CODE to help with this project but just general IMAGE-PRO PROCEDURES which would help you get the measurements you are looking for.





    Hi Matt, thank you for providing the document. I do know how do extract measurements in that way from the features. But median intensity for EACH is not an available option? That is the measure I am interested in. Not mean, max, min or std. I guess I am asking for code, but I have never used code with image pro premier so I did not know to ask for it? I wrote a code in matlab to extract median intensity but my lab would prefer I do it in imagepro as that is what they use. 
  • 2022-09-14-105045

    Molly --

    I apologize.

    I was reading your need as MEAN rather than MEDIAN.

    I brushed up on the definition of MEDIAN and generated a SAMPLE IMAGE that I believe illustrates what you are looking for.  Please see below where I lowered the resolution on an image of ABE LINCOLN to a manageable size and then moved the PIXEL INTENSITIES to EXCEL to find the MEDIAN.

    I do not believe that IMAGE-PRO or the PROJECT WORKBENCH has a built in mechanism to generate the MEDIAN for the PIXELS in a REGION OF INTEREST or within a MEASUREMENT OBJECT REGION.

    CODE could be written using the PROJECT WORKBENCH to extract the INDIVIDUAL PIXEL VALUES from a measurement MEASUREMENT OBJECT, sort those PIXEL VALUES, count those PIXEL VALUES, locate the MIDDLE (MEDIAN) VALUE, and report that MEDIAN VALUE.

    If you would like a quotation for the SERVICES to write that CODE, please let me know.

    I hope that information is helpful.

    -- Matt



  • Hi Molly, Thanks for your question. 

    Median intensity is not available as a measurement type. 

    As Matt is illustrating Image-Pro is extendable through Macros, writing a macro to extract the median intensity per object would be a non-trivial task and you would need someone with coding skills in order to do that. 

    Regards,
    Andrew

  • Hi Molly,

    We have Bitmap view, which shows pixels values of every pixel, which can be exported to Excel. In order to see values if only one object, you may need to apply masks.
    Image-Pro has tools to get Median values, this post shows how to do that (D50),

    https://forums.mediacy.com/discussion/1176/d10-d50-d90-partical-size-distribution-calculation-in-image-pro 

    but it will also require some programming skills to get pixel values.

    Yuri 
  • edited September 15
    Hi Molly,

    In order to cover this functionality I've created a macro project that calculates Median Intensity per object.
    You just load the attached project to Image-Pro and add "Intensity Median" measurement to the list. 
    After that the measurement will be reported in the table:



    Regards,

    Yuri
  • Hi Yuri, 
    Thank you so much. This worked, but is there a reason it would not work on TIFF series? I have a 4 series here that has frame 1 & 3 negative and frame 2 & 4 positive (see attached). . A different subject was used for the single image but it worked.
    Thank you so much! 
  • Hi Molly,

    It was an issue with value data range on 16-bit images (treated as signed Int16). I've fixed that. Please use the new version (unzip).

    Regards,

    Yuri

Sign In or Register to comment.