Segment Measurement Question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Segment Measurement Question

dogle-2
Hello group,

 

I am VERY new to ImageJ and have what is likely a very simple question;
a question, though, that will help me determine if ImageJ can meet my
simple needs.

 

I have images of fish scales that I would like to make measurements to
various landmarks (annual growth marks) along a transect drawn on the
scale.  I have marked the measurements along the transect using the
"Segmented Line Selections" tool and then used the "ListSelectionIndex"
macro to record the measurements of each segment to the results window.
The problem with this macro is that it seems to ignore the "Set Scale"
calibration and returns the results in pixel rather than real/actual
measurements.  I have attempted to modify the macro but do not know how
to access the image-to-actual measurement conversion value.  So, my two
questions,

 

1)       Is there a macro or plug-in that will automatically provide the
real/actual lengths of the individual segments of a "Segmented Line
Selection".

2)       How is the image-to-actual measurement conversion value
recorded in ImageJ such that I can access it and modify the
"LineSelectionIndex" macro to meet my needs.

 

Thank you very much, in advance, for any help that you can offer.

 

 

Dr. Derek H. Ogle

Associate Professor Of Mathematics

Northland College

715-682-1300

[hidden email]

www.ncfaculty.net/dogle/

 
Reply | Threaded
Open this post in threaded view
|

Re: Segment Measurement Question

Wayne Rasband
> I am VERY new to ImageJ and have what is likely a very
>  simple question; a question, though, that will help me
> determine if ImageJ can meet my simple needs.
>
> I have images of fish scales that I would like to make
> measurements to various landmarks (annual growth marks)
> along a transect drawn on the scale.  I have marked the
> measurements along the transect using the "Segmented Line
> Selections" tool and then used the "ListSelectionIndex"
> macro to record the measurements of each segment to the
> results window. The problem with this macro is that it seems
> to ignore the "Set Scale" calibration and returns the
> results in pixel rather than real/actual measurements.  I
> have attempted to modify the macro but do not know how to
> access the image-to-actual measurement conversion value.
> So, my two questions,
>
> 1)       Is there a macro or plug-in that will automatically
> provide the real/actual lengths of the individual segments
> of a "Segmented Line Selection".

There is an updated version of the ListSelectionCoordinates macro at

    http://rsb.info.nih.gov/ij/macros/ListSelectionCoordinates.txt

that does this. It is also at the end of this message.

> 2)       How is the image-to-actual measurement conversion value
> recorded in ImageJ such that I can access it and modify the
> "LineSelectionIndex" macro to meet my needs.

Call the getPixelSize() function to get the pixel width and height,
then multiply x coordinates by the pixel width and y coordinates by the
pixel height.

-wayne

   if (selectionType==-1)
       exit("Selection required");
   getSelectionCoordinates(x, y);
   getPixelSize(unit, pixelWidth, pixelHeight);
   run("Clear Results");
   count = 0;
   n = x.length;
   for (i=0; i<n; i++) {
       setResult("X", i, x[i]);
       setResult("Y", i, y[i]);
       dx = (x[(i+1)%n] - x[i])*pixelWidth;
       dy = (y[(i+1)%n] - y[i])*pixelHeight;
       length = sqrt(dx*dx+dy*dy);
       if (i<n-1 || selectionType<=4) {
           setResult("Length", i, length);
           sumLength += length;
           count++;
       }
   }
   if (count>0)
       setResult("Length", n, sumLength/count);
   updateResults();
Reply | Threaded
Open this post in threaded view
|

Segmentation Question

Ahmed Khwaja
In reply to this post by dogle-2
Hi,

I have a stack of RGB segmented images. I would like to remove the area
outside a closed segmented loop that is marked in red color. The segmented
line can be loaded from a different image.

Is there any tool in Imagej that can remove the area outside the segmented
loop.

Thanks for the help.

Ahmed
Reply | Threaded
Open this post in threaded view
|

Re: Segmentation Question

Christophe CHAMOT
Ahmed Khwaja a écrit :

> Hi,
>
> I have a stack of RGB segmented images. I would like to remove the area
> outside a closed segmented loop that is marked in red color. The segmented
> line can be loaded from a different image.
>
> Is there any tool in Imagej that can remove the area outside the segmented
> loop.
>
> Thanks for the help.
>
> Ahmed
>

Hello Ahmed and listers,

Can't you just use the magic wand on your loop and Edit > Clear outside?

Regards,

--
CHAMOT Christophe
---------------------------------------------------------------------
Plate-Forme de Recherche IFR117
"Imageries des Processus Dynamiques
en Biologie Cellulaire et Biologie du Développement "
Institut Jacques Monod, CNRS, Universités Paris 6 et 7
2, place Jussieu - Tour 43
75251 Paris cedex 05
Tel: 01 44 27 57 84
http://www.ijm.jussieu.fr/
---------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Segmentation Question

Ahmed Khwaja
Hi Chamot,

For some reason, the wand tool is not working properly in ImageJ. I just
tried Adobe Photoshop and I'm getting good results.

Thanks for your help.

Ahmed

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of CHAMOT
Christophe
Sent: Wednesday, 17 May, 2006 4:09 AM
To: [hidden email]
Subject: Re: Segmentation Question

Ahmed Khwaja a écrit :

> Hi,
>
> I have a stack of RGB segmented images. I would like to remove the
> area outside a closed segmented loop that is marked in red color. The
> segmented line can be loaded from a different image.
>
> Is there any tool in Imagej that can remove the area outside the
> segmented loop.
>
> Thanks for the help.
>
> Ahmed
>

Hello Ahmed and listers,

Can't you just use the magic wand on your loop and Edit > Clear outside?

Regards,

--
CHAMOT Christophe
---------------------------------------------------------------------
Plate-Forme de Recherche IFR117
"Imageries des Processus Dynamiques
en Biologie Cellulaire et Biologie du Développement "
Institut Jacques Monod, CNRS, Universités Paris 6 et 7 2, place Jussieu -
Tour 43
75251 Paris cedex 05
Tel: 01 44 27 57 84
http://www.ijm.jussieu.fr/
---------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Segmentation Question

Jarek Grodek
Ahmed Khwaja napisał(a):

> Hi Chamot,
>
> For some reason, the wand tool is not working properly in ImageJ. I just
> tried Adobe Photoshop and I'm getting good results.
>
> Thanks for your help.
>
> Ahmed
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of CHAMOT
> Christophe
> Sent: Wednesday, 17 May, 2006 4:09 AM
> To: [hidden email]
> Subject: Re: Segmentation Question
>
> Ahmed Khwaja a écrit :
>  
>> Hi,
>>
>> I have a stack of RGB segmented images. I would like to remove the
>> area outside a closed segmented loop that is marked in red color. The
>> segmented line can be loaded from a different image.
>>
>> Is there any tool in Imagej that can remove the area outside the
>> segmented loop.
>>
>> Thanks for the help.
>>
>> Ahmed
>>
>>    
>
> Hello Ahmed and listers,
>
> Can't you just use the magic wand on your loop and Edit > Clear outside?
>
> Regards,
>
> --
> CHAMOT Christophe
> ---------------------------------------------------------------------
> Plate-Forme de Recherche IFR117
> "Imageries des Processus Dynamiques
> en Biologie Cellulaire et Biologie du Développement "
> Institut Jacques Monod, CNRS, Universités Paris 6 et 7 2, place Jussieu -
> Tour 43
> 75251 Paris cedex 05
> Tel: 01 44 27 57 84
> http://www.ijm.jussieu.fr/
> ---------------------------------------------------------------------
>
>
>
>  
hello to all,
i want to change a bit this topic. i work on x-ray images of plant
tissues with imagej and the best for manual analysis would be the wand
tool just like in adobe photoshop, where one can set the tolerance and
select just a part of image. of course one can adjust treshold and try
extract the ROI with ij-wand tool, but it is not exactly how i would
imagine this operation. x-ray images of microdamages of plant tissue are
commonly slightly contrasted so it is difficult to properly select ROI
based on treshold adjustation. so, if someone has any clue how to get a
plug working like a wand in photoshop-big respect and lots of thanks
because it would made my life easier ;-)

please do not hesitate, if anyone know this kind of plugin, maybe i
missed in plugins list on ij homepage? please let me know.

with best regards,
Jarek Grodek

p.s. wish i was on Conference in Tudor Rechere Centre....
Reply | Threaded
Open this post in threaded view
|

Re: Segmentation Question

Leon Espinosa
Hello, I agree with the fact that the wand tool needs some way to  
increase or decrease the selected region by changing the "tolerance"  
for gray levels.

The threshold approach is not good because each region of the image  
needs different settings !

The "YAWI2D" works better because it don't need threshold and its  
tolerance good, but for good contrast images (MRI) but not "noisy  
fluorescence".

The 3D editing tools from Albert Cardona have a wand tool that works  
very good, but in my system everything crash after few seconds (?? G5  
mac OS X 10.4.6).

Somme commercial IA softwares have a very nice command linked to the  
wand tool: after click you can increase or decrease tolerance with  
the mouse wheel (or up/down arrows) and make open/close  
transformation of the selected region with left/right arrows, and  
even "morphological separation" for region with "8" shape" (shortcut  
"s")...

I have tried to modify the Wand tool source code but it was to high  
for my java knowledge...

Some ideas... ?


All the best, Leon




Le 17 mai 06 à 13:18, jarek a écrit :

> Ahmed Khwaja napisał(a):
>> Hi Chamot,
>>
>> For some reason, the wand tool is not working properly in ImageJ.  
>> I just
>> tried Adobe Photoshop and I'm getting good results.
>>
>> Thanks for your help.
>>
>> Ahmed
>>
>> -----Original Message-----
>> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf  
>> Of CHAMOT
>> Christophe
>> Sent: Wednesday, 17 May, 2006 4:09 AM
>> To: [hidden email]
>> Subject: Re: Segmentation Question
>>
>> Ahmed Khwaja a écrit :
>>
>>> Hi,
>>>
>>> I have a stack of RGB segmented images. I would like to remove  
>>> the area outside a closed segmented loop that is marked in red  
>>> color. The segmented line can be loaded from a different image.
>>>
>>> Is there any tool in Imagej that can remove the area outside the  
>>> segmented loop.
>>>
>>> Thanks for the help.
>>>
>>> Ahmed
>>>
>>>
>>
>> Hello Ahmed and listers,
>>
>> Can't you just use the magic wand on your loop and Edit > Clear  
>> outside?
>>
>> Regards,
>>
>> --
>> CHAMOT Christophe
>> ---------------------------------------------------------------------
>> Plate-Forme de Recherche IFR117
>> "Imageries des Processus Dynamiques
>> en Biologie Cellulaire et Biologie du Développement "
>> Institut Jacques Monod, CNRS, Universités Paris 6 et 7 2, place  
>> Jussieu -
>> Tour 43
>> 75251 Paris cedex 05
>> Tel: 01 44 27 57 84
>> http://www.ijm.jussieu.fr/
>> ---------------------------------------------------------------------
>>
>>
>>
>>
> hello to all,
> i want to change a bit this topic. i work on x-ray images of plant  
> tissues with imagej and the best for manual analysis would be the  
> wand tool just like in adobe photoshop, where one can set the  
> tolerance and select just a part of image. of course one can adjust  
> treshold and try extract the ROI with ij-wand tool, but it is not  
> exactly how i would imagine this operation. x-ray images of  
> microdamages of plant tissue are commonly slightly contrasted so it  
> is difficult to properly select ROI based on treshold adjustation.  
> so, if someone has any clue how to get a plug working like a wand  
> in photoshop-big respect and lots of thanks because it would made  
> my life easier ;-)
>
> please do not hesitate, if anyone know this kind of plugin, maybe i  
> missed in plugins list on ij homepage? please let me know.
>
> with best regards,
> Jarek Grodek
>
> p.s. wish i was on Conference in Tudor Rechere Centre....
>

Leon Espinosa
[hidden email]

Laboratoire des Rickettsies du Pr. RAOULT
UMR CNRS 6020
Fac. de Medecine de la Timone
27 Bd Jean Moulin
13005 Marseille

tel  04 91 38 55 17
fax 04 91 38 77 72

portable  06 79 25 97 40
Reply | Threaded
Open this post in threaded view
|

Re: Segmentation Question

Ahmed Khwaja
Hi Leon,
YAWI2D works great. Thank you for your help. I'll look more into 3D editing tool from Albert Cardona.
I appreciate your support.
Best,
Ahmed

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Leon Espinosa
Sent: Wednesday, 17 May, 2006 9:08 AM
To: [hidden email]
Subject: Re: Segmentation Question

Hello, I agree with the fact that the wand tool needs some way to increase or decrease the selected region by changing the "tolerance"  
for gray levels.

The threshold approach is not good because each region of the image needs different settings !

The "YAWI2D" works better because it don't need threshold and its tolerance good, but for good contrast images (MRI) but not "noisy fluorescence".

The 3D editing tools from Albert Cardona have a wand tool that works very good, but in my system everything crash after few seconds (?? G5 mac OS X 10.4.6).

Somme commercial IA softwares have a very nice command linked to the wand tool: after click you can increase or decrease tolerance with the mouse wheel (or up/down arrows) and make open/close transformation of the selected region with left/right arrows, and even "morphological separation" for region with "8" shape" (shortcut "s")...

I have tried to modify the Wand tool source code but it was to high for my java knowledge...

Some ideas... ?


All the best, Leon




Le 17 mai 06 à 13:18, jarek a écrit :

> Ahmed Khwaja napisał(a):
>> Hi Chamot,
>>
>> For some reason, the wand tool is not working properly in ImageJ.  
>> I just
>> tried Adobe Photoshop and I'm getting good results.
>>
>> Thanks for your help.
>>
>> Ahmed
>>
>> -----Original Message-----
>> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
>> CHAMOT Christophe
>> Sent: Wednesday, 17 May, 2006 4:09 AM
>> To: [hidden email]
>> Subject: Re: Segmentation Question
>>
>> Ahmed Khwaja a écrit :
>>
>>> Hi,
>>>
>>> I have a stack of RGB segmented images. I would like to remove the
>>> area outside a closed segmented loop that is marked in red color.
>>> The segmented line can be loaded from a different image.
>>>
>>> Is there any tool in Imagej that can remove the area outside the
>>> segmented loop.
>>>
>>> Thanks for the help.
>>>
>>> Ahmed
>>>
>>>
>>
>> Hello Ahmed and listers,
>>
>> Can't you just use the magic wand on your loop and Edit > Clear
>> outside?
>>
>> Regards,
>>
>> --
>> CHAMOT Christophe
>> ---------------------------------------------------------------------
>> Plate-Forme de Recherche IFR117
>> "Imageries des Processus Dynamiques
>> en Biologie Cellulaire et Biologie du Développement "
>> Institut Jacques Monod, CNRS, Universités Paris 6 et 7 2, place
>> Jussieu - Tour 43
>> 75251 Paris cedex 05
>> Tel: 01 44 27 57 84
>> http://www.ijm.jussieu.fr/
>> ---------------------------------------------------------------------
>>
>>
>>
>>
> hello to all,
> i want to change a bit this topic. i work on x-ray images of plant
> tissues with imagej and the best for manual analysis would be the wand
> tool just like in adobe photoshop, where one can set the tolerance and
> select just a part of image. of course one can adjust treshold and try
> extract the ROI with ij-wand tool, but it is not exactly how i would
> imagine this operation. x-ray images of microdamages of plant tissue
> are commonly slightly contrasted so it is difficult to properly select
> ROI based on treshold adjustation.
> so, if someone has any clue how to get a plug working like a wand in
> photoshop-big respect and lots of thanks because it would made my life
> easier ;-)
>
> please do not hesitate, if anyone know this kind of plugin, maybe i
> missed in plugins list on ij homepage? please let me know.
>
> with best regards,
> Jarek Grodek
>
> p.s. wish i was on Conference in Tudor Rechere Centre....
>

Leon Espinosa
[hidden email]

Laboratoire des Rickettsies du Pr. RAOULT UMR CNRS 6020 Fac. de Medecine de la Timone
27 Bd Jean Moulin
13005 Marseille

tel  04 91 38 55 17
fax 04 91 38 77 72

portable  06 79 25 97 40
Reply | Threaded
Open this post in threaded view
|

Re: Segmentation Question

TTian
In reply to this post by Ahmed Khwaja
Hi Ahmed,

Sorry to bother you. I noticed your images are RGB stack images which are the same with mine. Could I ask which plugin did you use for segmentation?

Thank you.
Tian