Login  Register

Re: Getting stats from Trainable Weka Segmentation plugin?

Posted by Mr Patrick Fortuna on Sep 16, 2013; 10:41pm
URL: http://imagej.273.s1.nabble.com/Getting-stats-from-Trainable-Weka-Segmentation-plugin-tp5004723p5004811.html

Thanks for that, it worked perfectly!
Would there be any way to increase the amount of classes allowed within one classifier set?
Or do I just need to make several classifier sets to run on the same image?

Cheers,
Patrick
________________________________________
From: ImageJ Interest Group [[hidden email]] on behalf of Ignacio Arganda-Carreras [[hidden email]]
Sent: 11 September 2013 05:43 PM
To: [hidden email]
Subject: Re: Getting stats from Trainable Weka Segmentation plugin?

My bad, the macro assumes you have clicked on "Create result" and therefore
the "Classified image" window is there. I should have told you.

ignacio


On Tue, Sep 10, 2013 at 11:49 PM, Mr Patrick Fortuna <
[hidden email]> wrote:

> Hi Ignacio,
>
> Thanks for the reply!
> I tried running the macro, but it comes back with this message:
> 'No window with the title "Classified image" found'.
> Followed by giving the same area measurement for the image 5 times.
> I tried changing the "selectwindow" to Trainable Weka Segmentation
> thinking that this might locate the image, but no luck with that on getting
> different area measurements as the output.
> Any ideas on how to fix this?
>
> Thanks and regards,
> Patrick
> ________________________________________
> From: ImageJ Interest Group [[hidden email]] on behalf of Ignacio
> Arganda-Carreras [[hidden email]]
> Sent: 09 September 2013 07:30 PM
> To: [hidden email]
> Subject: Re: Getting stats from Trainable Weka Segmentation plugin?
>
> Dear Patrick,
>
> Here you are a macro that does (I believe) what you want. Let me know if
> you have questions.
>
> (i copy/paste it here because the server doesn't seem to like me attaching
> it)
>
> <code>
>
>
> // id values of each class in the classified image
> classLabels = newArray( 0, 64, 128, 191, 255 );
>
> setBatchMode( true );
> run("Set Measurements...", "area_fraction redirect=None decimal=3");
>
> for( i=0; i<classLabels.length; i ++ )
> {
> minTh = classLabels[ i ];
> maxTh = classLabels[ i ];
>  if( i < classLabels.length - 1 )
>  maxTh = classLabels[ i+1 ] -1;
> else // last value is assumed to be 255
>  {
> minTh = classLabels[ i-1 ] +1;
>  maxTh = classLabels[ i ];
> }
>  selectWindow("Classified image");
>  run("Duplicate...", "title=[to-be-thresholded]");
> selectWindow("to-be-thresholded");
>  setThreshold( minTh, maxTh );
> run("Convert to Mask");
>  run("Measure");
> close();
> }
>
>
>
>
> </code>
>
>
>
> Cheers!
>
> ignacio
>
>
>
> On Mon, Sep 9, 2013 at 7:47 AM, Mr Patrick Fortuna <
> [hidden email]> wrote:
>
> > Hi ImageJ users/developers,
> >
> > I'm quite new with using ImageJ (Fiji) and was wondering if anyone could
> > help out with getting some stats?
> > I'm using the Trainable Weka Segmentation plugin through Fiji to train
> and
> > segment an H/E stained section of a teratoma (benign tumor formed from
> > undifferentiated stem cells).
> > Once I've trained the classifiers for the various classes I'm interested
> > in, I'd be really interested in getting stats on what percentage of each
> > classifier is present within the image I'm working with.
> > I've tried using the Measurement of Percent Area (as described here:
> > http://www.nist.gov/lispix/imlab/measure/pctarea.html) although I
> > couldn't seem to set the threshold cause I have more than one color in
> the
> > segmented image (due to 5 classifiers being run at the same time).
> > Could anyone recommend how to get the stats of my interested classes?
> > Any help would be much appreciated!
> >
> > Thanks and regards,
> > Patrick
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
>
>
> --
> Ignacio Arganda-Carreras, Ph.D.
> Seung's lab, 46-5065
> Department of Brain and Cognitive Sciences
> Massachusetts Institute of Technology
> 43 Vassar St.
> Cambridge, MA 02139
> USA
>
> Phone: (001) 617-324-3747
> Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-324-3747
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html