J = bwselect3(V,c,r,p)
returns the binary volume J containing the objects that overlap
the voxel (r,c,p).
Objects are connected sets of voxels with the value 1.

J = bwselect3(V,c,r,p,n)
also specifies the connectivity, n, used to define
objects.

[J,idx] = bwselect3(___)
returns in idx the linear indices of voxels belonging to the
selected objects.

[x,y,z,J,idx,xi,yi,zi] = bwselect3(___)
also returns the x, y, and
z extents of the binary volume and the
(xi,yi,zi)
coordinates of selected voxels. By default, bwselect3 uses the
intrinsic coordinate system so that x,y,
and z are the volume XData,
YData, and ZData.

[___] = bwselect3(x,y,z,V,xi,yi,zi)
establishes a nondefault world coordinate system for V from the
vectors x, y, and z.
The arguments xi, yi, and
zi specify voxel coordinates in the world coordinate
system.

r — Row index of voxels numeric scalar | numeric vector

Row index of voxels in objects of interest, specified as a numeric scalar
or numeric vector. If you specify a vector, then r must
be the same length as c and p. The
output binary volume J contains the sets of objects
overlapping with any of the voxels
(r(k),
c(k),
p(k)), where
k is an index into the vector.

c — Column index of object numeric scalar | numeric vector

Column index of voxels in objects of interest, specified as a numeric
scalar or numeric vector. If you specify a vector, then
c must be the same length as r
and p. The output binary volume J
contains the sets of objects overlapping with any of the voxels
(r(k),
c(k),
p(k)), where
k is an index into the vector.

p — Plane index of object numeric scalar | numeric vector

Plane index of voxels in objects of interest, specified as a numeric
scalar or numeric vector. If you specify a vector, then
p must be the same length as r
and c. The output binary volume J
contains the sets of objects overlapping with any of the voxels
(r(k),
c(k),
p(k)), where
k is an index into the vector.

x — World x-axis coordinates numeric scalar | numeric vector

World x-axis coordinates, specified as a numeric scalar
or numeric vector of the same length as y and
z. Use x, y,
and z to establish a nondefault spatial coordinate
system. If you do not specify a coordinate system, then by default
bwselect3 uses the intrinsic coordinate system in
which x is [1,
size(J,2)].

y — World y-axis coordinates numeric scalar | numeric vector

World y-axis coordinates, specified as a numeric scalar
or numeric vector of the same length as x and
z. Use x, y,
and z to establish a nondefault spatial coordinate
system. If you do not specify a coordinate system, then by default
bwselect3 uses the intrinsic coordinate system in
which y is [1,
size(J,1)].

z — World z-axis coordinates numeric scalar | numeric vector

World z-axis coordinates, specified as a numeric scalar
or numeric vector of the same length as x and
y. Use x, y,
and z to establish a nondefault spatial coordinate
system. If you do not specify a coordinate system, then by default
bwselect3 uses the intrinsic coordinate system in
which z is [1,
size(J,3)].

Binary volume containing objects that overlap specified voxels, returned
as a 3-D logical array. J contains the set of objects
overlapping with any of the voxels specified by
r,c, and
p, or
xi,yi, and
zi.

idx — Linear indices of voxels belonging to selected objects numeric vector

Linear indices of the voxels belonging to the selected objects, returned
as a numeric vector.

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.