[ImageJ-devel] Feature Extraction

Jay Warrick warrick at wisc.edu
Thu May 14 13:44:59 CDT 2015


Hi Christian,

Thanks so much! This helps a lot. I probably wouldn't have discovered the tools for labeling immediately without your suggestion. Although I've gone through the tutorials, I'm still new to ImgLib2 so I wonder if I could try to summarize what I think the general workflow to be with an example and maybe you can correct me / direct me as I go? As a place to start, I'm imagining a scenario where I have a 1-plane, 1-channel nuclear stained image of cells and its associated thresholded image to identify nuclear regions for quantifying feature sets. At a high-level, what I imagine trying to do is...

1) Generate a labeling object. For example, using the following...

final Labeling< T > labeling = new NativeImgLabeling< T, IntType >( Img < T > );

I assume this simplified constructor takes what could be a "black and white" image and associates Long numbers with each separate region of white pixels. Right? How might I reassign labels or construct them if, for example, I have specific IDs that I would like to associate with each white region of the mask image I would like to label?

2) Once I have a labeling, it seems like the next step is to obtain an IterableInterval over an ROI that can return "x-y locations" of pixels with a particular label. I assume to get this I would use something like...

labeling.getIterableRegionOfInterest(i).getIterableIntervalOverROI(src)

I can see where sometimes I only care about the shape of the ROI (e.g., with Zernike shape features) and other times I want pixel intensities at those locations (e.g., texture features). For the latter case, I assume "src" could be an image whose pixel values I'm interested at these locations, essentially applying an ROI to a particular image. Right? For other scenarios where only shape matters, would I use "labeling.getRegionOfInterest()" and that would be sufficient? Does the Zernike feature set prefer ROIs that define the boundaries of the shape or the whole region of the shape and it figures out the boundaries itself?

3) Then I suppose I loop through the labels in the "labeling" object to get these ROIs and pass them to the FeatureSet ops accessing the data as you do in the provided example and storing the data however I like.

Is that about right?

Lastly, related to Step 1,it looks like a labeling can hold multiple labels for each pixel location. Is the idea there to allow regions to overlap? If I'm generally interested in keeping pixels associated with a maximum of one cell, would I use this feature for anything else and if so, what sort of workflow is envisioned for creating these different labelings and essentially ending up with the merged information in a single labeling object?

Thanks!!!

Jay




> On May 13, 2015, at 8:22 AM, Christian Dietz <Christian.Dietz at uni-konstanz.de> wrote:
> 
> Hi Jay,
> 
> you are right, we are working on this project since a while. The goal of the work we are doing is to have efficient implementations for most of the well known features which can be derived from images or ROIs. The main work is done on the following branch:
> 
> https://github.com/imagej/imagej-ops/tree/outputop-service
> 
> and there is an open issue documenting the process:
> 
> https://github.com/imagej/imagej-ops/issues/67
> 
> A very small example how to use the features is given at:
> 
> https://github.com/imagej/imagej-ops/blob/outputop-service/src/main/java/net/imagej/ops/features/Example.java
> 
> Concerning your question with ROIs: The features implementation do not really care if they get an Img or a ROI. The only thing they expect is to get some IterableInterval or Iterable or RandomAccessibleInterval etc (depends on the type of feature). In KNIME we use Labelings (https://github.com/imglib/imglib2-roi/tree/master/src) to describe our segmentations and derive or ROIs.
> 
> Does this help you? It would be great if you want to contribute to the outputop-service and maybe implement some of the missing features.
> 
> Best,
> 
> Christian
> 
> 
> 
> 
> On 13.05.2015 06:27, Jay Warrick wrote:
>> Hi All,
>> 
>> I was hoping to find some info on the 'feature service' or 'haralick' branch of imagej-ops (at least those look like to two most developed branches for feature extraction). The creation of feature set ops is a really great idea and thanks to everyone who is working on it. Likewise, I would certainly be willing to try and help fill out some features if it seems appropriate, especially when I get more familiar with the ops framework. Also, please let me know if there are any concerns with me using any of these tools prior to the authors publishing on/with these implementations themselves. My work is still preliminary, but just wanted to ask to be safe.
>> 
>> I realize the 'feature service' and 'haralick' branches are somewhat WIPs but it seems there are many rich feature sets that appear to be nearly or completely implemented and was hoping to try and use them if possible... Towards this goal, I was able to use the FirstOrderStatFeatureSet and ZernikeFeatureSet classes to get information from an Img / ImgPlus / SCIFIOImgPlus using the example provided in the branch. However, it is unclear to me how the classes should be used to do this for each cell in an image. Is it assumed that we are feeding in small cropped and masked regions to the feature set ops? If so, suggestions on an efficient way to do so (or links to examples in other projects... Knime?) would be amazing. I'm generally able to identify cells and create ROIs and mask images etc programmatically in Java with ImageJ classes, but haven't done so with Img-related image objects yet. With a hint or two, I can try and take it from there. Maybe do the cropping etc with old I
>>  mageJ classes and wrap the resultant cropped regions in Img objects? Maybe I'm way off base and I'm supposed to be using ROIs somewhere in the mix with the ops. Hopefully someone can set me straight :-)
>> 
>> Thanks a bunch in advance.
>> 
>> Best,
>> 
>> Jay
>> _______________________________________________
>> ImageJ-devel mailing list
>> ImageJ-devel at imagej.net
>> http://imagej.net/mailman/listinfo/imagej-devel
> 
> 
> 
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20150514/fc257657/attachment.html>


More information about the ImageJ-devel mailing list