首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于聚类和像素值被截断而导致难以计数像元

由于聚类和像素值被截断而导致难以计数像元
EN

Stack Overflow用户
提问于 2014-06-05 01:38:27
回答 2查看 206关注 0票数 2

编辑:

我一直在解决我的问题,并取得了重大进展。使用ImageJwiki上提供的一个阿什比博士的宏,以及我自己的一些临时代码,我现在可以对Hoescht,Calcein AM和Ethidium Homodimer染色拍摄的图像进行批量处理,并获得良好的物体识别。减少曝光时间和使用的污渍水平(特别是calcein AM)有助于我之前处理的像素值截断。不过,宏在区分成块的单元格方面仍然存在问题。为了解决这个问题,我想在我的宏中实现一个命令,该命令根据我们的单元的平均大小将单元集群划分为一个单元。唯一的问题是,在我所有的阅读中,我没有看到任何提到这一点的东西。有没有人对我如何实现这段代码有什么想法?我已经复制了下面的宏。

代码语言:javascript
复制
  //get appropriate directories from user
  dir1 = getDirectory("Choose Source Directory ");
  dir2 = getDirectory("Choose Destination directory");
  list = getFileList(dir1);

    //give user an opportunity to adjust default parameters to better fit their application
    Dialog.create("Adjust for objective magnification");
    Dialog.addNumber("Objective Magnification (use 10 if unknown)", 10);
    Dialog.addMessage("\tIf needed particle size limits can be adjusted below \nLeave mag. at 10 if customizing particle size limits\n");
    Dialog.addNumber("Minimum particle size (pixels^2)",420);
    Dialog.addNumber("Maximum particle size (pixels^2)",1600);
    Dialog.addMessage("\tIn the following dialogs select \n first the Source Directory, \nthen a Destinaion directory for Results");
    Dialog.show();  

    //Assigning the entered values to variables   
    magnification=Dialog.getNumber();
    userMin=Dialog.getNumber();
    userMax=Dialog.getNumber();
    sMin=magnification*magnification/100*userMin;
    sMax=magnification*magnification/100*userMax;

setBatchMode(true);

for (i=0; i<list.length; i++){
    //print (list[i]);
    open(dir1+list[i]);
    name=File.nameWithoutExtension;
    //Prepare the image by removing any scale and making 8-bit
    run("Set Scale...", "distance=0 known=0 pixel=1 unit=pixel");
    run("8-bit");
    saveAs("Tiff", dir2+i+" Original "+name);//Saving with this naming scheme is required for   the MeLast macro to function
    //run("Brightness/Contrast...");
    setMinAndMax(50, 255);
    setOption("BlackBackground", false);
    run("Make Binary", "method=Yen background=Light calculate black");
    run("Watershed", "stack");
    //Analyze particles
    run("Analyze Particles...", "size="+sMin+"-"+sMax+" circularity=0.50-1.00 show=[Count Masks] display exclude include summarize");
    //Save the masks file
    saveAs("Tiff", dir2+i+" CountMask "+name);//Saving with this naming scheme is required for the MeLast macro to function
    close();
    //Save the thresholded image
    saveAs("Tiff", dir2+i+" Thresholded "+name);//Saving with this naming scheme is required for the MeLast macro to function

}
//Save the results
selectWindow("Results");
saveAs("Results", dir2+"ZZ Results.xls");

//Save the summary
selectWindow("Summary");
saveAs("Text", dir2+"Z Summary.txt");
EN

回答 2

Stack Overflow用户

发布于 2014-06-05 02:15:22

您需要找到这些群集并分析每个群集,以使用单元的空间信息和问题域中的其他特定信息来猜测有多少个单元可能属于该群集。我相信这是一项常见的图像分析任务。

至于截断像素值,我猜你可以将截断像素视为经过审查的数据。但我不确定这对8位深度的图像有多大意义。

票数 0
EN

Stack Overflow用户

发布于 2014-12-04 03:47:51

还有另一个免费的开放源码程序CellProfiler (http://www.cellprofiler.org),它有一些比标准分水岭更高级的分离细胞的专门方法。例如,请参阅手册的一部分:http://www.cellprofiler.org/CPmanual/IdentifyPrimaryObjects.html

也许CellProfiler可以完成这项工作,或者为您提供要引入ImageJ宏中的正确算法。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24043994

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档