[BioC] Visualizing the region of classification uncertainty on thresholded images
guest at bioconductor.org
Mon Aug 6 17:26:31 CEST 2012
I am now able to calculate the percent area of a certain phase on an image(thanks to the excellent help that I have received from this forum). My follow-up question is as follows :
Depending on the threshold level chosen to create a binary image, the percent area calculated will vary. I would like to have a means of visualizing the uncertain regions represented by a threshold band level on the original image. If we start with the following code :
img = readImage(system.file("images", "nuclei.tif", package="EBImage"))[,,1]
t2c<-t1c+tdiff; t2=t2c/255 # A second threshold level
plot(timg) # open to suggestions for better coding!
imgB=!imgB #flip foreground to background
# Attempt to visualise the area represented by a threshold band i,e, (t2-t1)
# does not appear to be correct
# the area seems to much greater than the 0.5%
# obtained from the results of thresholding with t1 & t2
I don't think that img2 gives what I am hoping to get. As I mentioned previously, my intention is to identify the regions in img with intensity levels between t1 and t2 (the threshold band level represented by the red lines in the image histogram figure).
I am interested in the following :
1. To color the uncertain regions in img2 with letâs say red colour and even have the choice of making it transparent. To then superpose img2 on top of the original image.
2. Maybe the reverse process is better. To make the original figure transparent and superpose it on img2.
I am perhaps asking for too much. But I would appreciate any tip that I can get.
-- output of sessionInfo():
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)
 LC_COLLATE=Swedish_Sweden.1252 LC_CTYPE=Swedish_Sweden.1252 LC_MONETARY=Swedish_Sweden.1252
 LC_NUMERIC=C LC_TIME=Swedish_Sweden.1252
attached base packages:
 splines stats graphics grDevices utils datasets methods base
other attached packages:
 CRImage_1.6.0 aCGH_1.34.0 multtest_2.12.0 Biobase_2.16.0 BiocGenerics_0.2.0
 survival_2.36-14 cluster_1.14.2 DNAcopy_1.30.0 EBImage_3.12.0 abind_1.4-0
loaded via a namespace (and not attached):
 class_7.3-4 codetools_0.2-8 e1071_1.6 foreach_1.4.0 iterators_1.0.6 MASS_7.3-20 stats4_2.15.1
Sent via the guest posting facility at bioconductor.org.
More information about the Bioconductor