J= bwselect3(V,c,r,p)returns the binary volumeJcontaining the objects that overlap the voxel (r,c,p). Objects are connected sets of voxels with the value1。
J= bwselect3(V,c,r,p,n)also specifies the connectivity,n, used to define objects.
[J,idx] = bwselect3(___)returns inidxthe linear indices of voxels belonging to the selected objects.
[x,y,z,J,idx,xi,yi,zi] = bwselect3(___)also returns thex,y, andzextents of the binary volume and the (xi,yi,zi) coordinates of selected voxels. By default,bwselect3uses the intrinsic coordinate system so thatx,y, andzare the volumeXData,YData, andZData。
[___] = bwselect3(x,y,z,V,xi,yi,zi)establishes a nondefault world coordinate system forVfrom the vectorsx,y, andz。The argumentsxi,yi, andzispecify voxel coordinates in the world coordinate system.
Binary volume, specified as a 3-D numeric array or 3-D logical array.
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|logical
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, thenrmust be the same length ascandp。输出二进制volumeJcontains the sets of objects overlapping with any of the voxels (r(k),c(k),p(k)), wherekis an index into the vector.
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
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, thencmust be the same length asrandp。输出二进制volumeJcontains the sets of objects overlapping with any of the voxels (r(k),c(k),p(k)), wherekis an index into the vector.
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
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, thenpmust be the same length asrandc。输出二进制volumeJcontains the sets of objects overlapping with any of the voxels (r(k),c(k),p(k)), wherekis an index into the vector.
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
n—Connectivity 26(default) |6|18
Connectivity, specified as one of these values.
Connectivities
瓦尔ue
Connectivity
6
6-connected objects (Face-Face)
18
18-connected对象(面和Edge-Edge)
26
26-connected objects (Face-Face, Edge-Edge, and Vertex-Vertex)
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
Worldx-axis coordinates, specified as a numeric scalar or numeric vector of the same length asyandz。Usex,y, andzto establish a nondefault spatial coordinate system. If you do not specify a coordinate system, then by defaultbwselect3uses the intrinsic coordinate system in whichxis [1,size(J,2)].
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
Worldy-axis coordinates, specified as a numeric scalar or numeric vector of the same length asxandz。Usex,y, andzto establish a nondefault spatial coordinate system. If you do not specify a coordinate system, then by defaultbwselect3uses the intrinsic coordinate system in whichyis [1,size(J,1)].
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
Worldz-axis coordinates, specified as a numeric scalar or numeric vector of the same length asxandy。Usex,y, andzto establish a nondefault spatial coordinate system. If you do not specify a coordinate system, then by defaultbwselect3uses the intrinsic coordinate system in whichzis [1,size(J,3)].
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
xi—x-coordinates of voxels numeric scalar|numeric vector
x-coordinates of voxels in the world coordinate system, specified as a numeric scalar or numeric vector.
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
yi—y-coordinates of voxels numeric scalar|numeric vector
y-coordinates of voxels in the world coordinate system, specified as a numeric scalar or numeric vector.
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
zi—z-coordinates of voxels numeric scalar|numeric vector
z-coordinates of voxels in the world coordinate system, specified as a numeric scalar or numeric vector.
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64
Binary volume containing objects that overlap specified voxels, returned as a 3-D logical array.Jcontains the set of objects overlapping with any of the voxels specified byr,c, andp, orxi,yi, andzi。
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.