Description Usage Arguments Details Value Author(s) Examples
Relational operators to compare pixel values of an antsImage
with a scalar value within a given antsRegion
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | img == value
img != value
img <= value
img >= value
img < value
img > value
img == lst
img != lst
img <= lst
img >= lst
img < lst
img > lst
|
img |
Image object of S4 class 'antsImage' to be indexed. |
value |
Scalar |
lst |
|
img == value
Image-region considered is the largest-possible-region( entire image ) of the image.
logical vector
of dimensions equal to that of 'region' considered – Success ; NA – Failure
Shrinidhi KL
1 2 3 4 5 6 7 8 9 10 | ## Not run:
# compare all the values in the region starting at index 'c(1,1,1)' with size 'c(10,10,10)' with value '20' ;
# here the logical vector 'vect' will have dimensions '10*10*10'
reg = new( "antsRegion" , index = c(1,1,1) , size = c(10,10,10) )
vect = ( img = list( value = 20 , region = reg ) )
# compare all the pixels in the image with value '30' ;
# here the logical vector 'vect' will have dimensions of the image
vect = ( img == 30 )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.