# 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 )
# }
Run the code above in your browser using DataLab