Skip to content

ShapeWorks Python API

ShapeWorks Python API

ContourDomain = <DomainType.ContourDomain: 67>

Members:

MeshDomain

ImageDomain

ContourDomain

ImageDomain = <DomainType.ImageDomain: 73>

Members:

MeshDomain

ImageDomain

ContourDomain

Linear = <InterpolationType.Linear: 0>

Members:

Linear

NearestNeighbor

MeshDomain = <DomainType.MeshDomain: 77>

Members:

MeshDomain

ImageDomain

ContourDomain

NearestNeighbor = <InterpolationType.NearestNeighbor: 1>

Members:

Linear

NearestNeighbor

Pi = 3.141592653589793

Convert a string or number to a floating point number, if possible.

X = <Axis.X: 0>

Members:

invalid

X

Y

Z

Y = <Axis.Y: 1>

Members:

invalid

X

Y

Z

Z = <Axis.Z: 2>

Members:

invalid

X

Y

Z

invalid = <Axis.invalid: -1>

Members:

invalid

X

Y

Z

Analyze()

Bases: pybind11_object

create_shape_from_points() method descriptor

create_shape_from_points(self: shapeworks_py.Analyze, arg0: shapeworks::Particles) -> shapeworks::Shape

get_mean_shape() method descriptor

get_mean_shape(self: shapeworks_py.Analyze) -> shapeworks_py.Mesh

get_mean_shape_points() method descriptor

get_mean_shape_points(self: shapeworks_py.Analyze) -> numpy.ndarray[numpy.float64[m, 1]]

get_mode_shape() method descriptor

get_mode_shape(self: shapeworks_py.Analyze, arg0: int, arg1: float) -> shapeworks::Shape

get_num_modes() method descriptor

get_num_modes(self: shapeworks_py.Analyze) -> int

get_num_particles() method descriptor

get_num_particles(self: shapeworks_py.Analyze) -> int

get_num_subjects() method descriptor

get_num_subjects(self: shapeworks_py.Analyze) -> int

get_shape_points() method descriptor

get_shape_points(self: shapeworks_py.Analyze, arg0: int, arg1: float) -> shapeworks::Particles

get_shapes() method descriptor

get_shapes(self: shapeworks_py.Analyze) -> std::__1::vector, std::__1::allocator\>>

get_subject_features() method descriptor

get_subject_features(self: shapeworks_py.Analyze, arg0: int, arg1: str) -> numpy.ndarray[numpy.float64[m, 1]]

groups_active() method descriptor

groups_active(self: shapeworks_py.Analyze) -> bool

run_offline_analysis() method descriptor

run_offline_analysis(self: shapeworks_py.Analyze, arg0: str, arg1: float, arg2: float) -> None

Axis()

Bases: pybind11_object

Members:

invalid

X

Y

Z

X = <Axis.X: 0>

Members:

invalid

X

Y

Z

Y = <Axis.Y: 1>

Members:

invalid

X

Y

Z

Z = <Axis.Z: 2>

Members:

invalid

X

Y

Z

invalid = <Axis.invalid: -1>

Members:

invalid

X

Y

Z

name property

name(self: handle) -> str

DomainType()

Bases: pybind11_object

Members:

MeshDomain

ImageDomain

ContourDomain

ContourDomain = <DomainType.ContourDomain: 67>

Members:

MeshDomain

ImageDomain

ContourDomain

ImageDomain = <DomainType.ImageDomain: 73>

Members:

MeshDomain

ImageDomain

ContourDomain

MeshDomain = <DomainType.MeshDomain: 77>

Members:

MeshDomain

ImageDomain

ContourDomain

name property

name(self: handle) -> str

Groom()

Bases: pybind11_object

run() method descriptor

run(self: shapeworks_py.Groom) -> bool

Image()

Bases: pybind11_object

  1. init(self: shapeworks_py.Image, arg0: str) -> None

  2. init(self: shapeworks_py.Image, arg0: shapeworks_py.Image) -> None

  3. init(self: shapeworks_py.Image, arg0: numpy.ndarray) -> None

Initialize an image from a numpy array (must be dtype float32). Transfers ownership of the array without copying. If a copy is desired, construct using Image(np.array(arr)).

antialias() method descriptor

antialias(self: shapeworks_py.Image, iterations: int = 50, maxRMSErr: float = 0.009999999776482582, layers: int = 3) -> shapeworks_py.Image

antialiases binary volumes (layers is set to 3 when not specified)

applyCurvatureFilter() method descriptor

applyCurvatureFilter(self: shapeworks_py.Image, iterations: int = 10) -> shapeworks_py.Image

denoises an image using curvature driven flow using curvature flow image filter

applyGradientFilter() method descriptor

applyGradientFilter(self: shapeworks_py.Image) -> shapeworks_py.Image

computes gradient magnitude at each pixel using gradient magnitude filter

applyIntensityFilter() method descriptor

applyIntensityFilter(self: shapeworks_py.Image, min: float = 0.0, max: float = 0.0) -> shapeworks_py.Image

applies intensity windowing image filter

applySigmoidFilter() method descriptor

applySigmoidFilter(self: shapeworks_py.Image, alpha: float = 10.0, beta: float = 10.0) -> shapeworks_py.Image

computes sigmoid function pixel-wise using sigmoid image filter

applyTPLevelSetFilter() method descriptor

applyTPLevelSetFilter(self: shapeworks_py.Image, featureImage: shapeworks_py.Image, scaling: float = 20.0) -> shapeworks_py.Image

segments structures in image using topology preserving geodesic active contour level set filter

applyTransform() method descriptor

applyTransform(args, *kwargs) Overloaded function.

  1. applyTransform(self: shapeworks_py.Image, transform: numpy.ndarray[numpy.float64[4, 4]], interp: shapeworks_py.InterpolationType = , meshTransform: bool = False) -> shapeworks_py.Image

applies the given transformation to the image by using the specified resampling filter (Linear or NearestNeighbor)

  1. applyTransform(self: shapeworks_py.Image, transform: shapeworks_py.WarpTransform, interp: shapeworks_py.InterpolationType = ) -> shapeworks_py.Image

applies the given warp transformation to the image using the specified resampling filter (Linear or NearestNeighbor)

  1. applyTransform(self: shapeworks_py.Image, transform: numpy.ndarray[numpy.float64[4, 4]], origin: List[float], dims: List[int], spacing: List[float], direction: numpy.ndarray[numpy.float64[3, 3]], interp: shapeworks_py.InterpolationType = , meshTransform: bool = False) -> shapeworks_py.Image

applies the given transformation to the image by using resampling filter with new origin, dims, spacing, and sampling along given direction axes (a 3x3 row-major matrix) using the specified interpolation method (Linear or NearestNeighbor)

assign() method descriptor

assign(self: shapeworks_py.Image, arg0: numpy.ndarray) -> shapeworks_py.Image

Initialize an image from a numpy array (must be dtype float32). Transfers ownership of the array without copying. If a copy is desired, construct using Image(np.array(arr)).

binarize() method descriptor

binarize(self: shapeworks_py.Image, minVal: float = 0.0, maxVal: float = 3.4028234663852886e+38, innerVal: float = 1.0, outerVal: float = 0.0) -> shapeworks_py.Image

sets portion of image greater than min and less than or equal to max to the specified value

center() method descriptor

center(self: shapeworks_py.Image) -> numpy.ndarray

physical coordinates of center of this image

centerOfMass() method descriptor

centerOfMass(self: shapeworks_py.Image, minVal: float = 0.0, maxVal: float = 1.0) -> numpy.ndarray

returns average physical coordinate of pixels in range (minval, maxval]

clip() method descriptor

clip(args, *kwargs) Overloaded function.

  1. clip(self: shapeworks_py.Image, o: List[float], p1: List[float], p2: List[float], val: float = 0.0) -> shapeworks_py.Image

sets values on the back side of cutting plane (containing three non-colinear points) to val (default 0.0)

  1. clip(self: shapeworks_py.Image, n: List[float], q: List[float], val: float = 0.0) -> shapeworks_py.Image

sets values on the back side of cutting plane (normal n containing point p) to val (default 0.0)

closeHoles() method descriptor

closeHoles(self: shapeworks_py.Image, foreground: float = 0.0) -> shapeworks_py.Image

closes holes in a volume defined by values larger than specified value

compare() method descriptor

compare(args, *kwargs) Overloaded function.

  1. compare(self: shapeworks_py.Image, other: shapeworks_py.Image, verifyall: bool = True, tolerance: float = 0.0, precision: float = 1e-12) -> bool

compares two images

  1. compare(self: shapeworks_py.Image, other: shapeworks_py.Image, verifyall: bool = True, tolerance: float = 0.0, precision: float = 1e-12) -> bool

compares two images

computeDT() method descriptor

computeDT(self: shapeworks_py.Image, isovalue: float = 0.0) -> shapeworks_py.Image

computes signed distance transform volume from an image at the specified isovalue

coordsys() method descriptor

coordsys(self: shapeworks_py.Image) -> numpy.ndarray[numpy.float64[3, 3]]

return 3x3 coordinate system in which this image lives in physical space

copy() method descriptor

copy(self: shapeworks_py.Image) -> shapeworks_py.Image

createCenterOfMassTransform() method descriptor

createCenterOfMassTransform(self: shapeworks_py.Image) -> numpy.ndarray[numpy.float64[m, n]]

creates a transform that translates center of mass to center of image

createRigidRegistrationTransform() method descriptor

createRigidRegistrationTransform(self: shapeworks_py.Image, target: shapeworks_py.Image, isoValue: float = 0.0, iterations: int = 20) -> numpy.ndarray[numpy.float64[m, n]]

creates transform to target image using iterative closest point (ICP) registration; images MUST be distance transforms; isovalue is used to create meshes from these distance transform images, which are then passed to ICP for the given number of iterations

crop() method descriptor

crop(self: shapeworks_py.Image, region: shapeworks::PhysicalRegion, padding: int = 0) -> shapeworks_py.Image

crops the image down to the given (physica) region, with optional padding

dims() method descriptor

dims(self: shapeworks_py.Image) -> numpy.ndarray

logical dimensions of the image

evaluate() method descriptor

evaluate(self: shapeworks_py.Image, pt: List[float]) -> float

evaluate the image at any given point in space

extractLabel() method descriptor

extractLabel(self: shapeworks_py.Image, label: float = 1.0) -> shapeworks_py.Image

extracts/isolates a specific pixel label from a given multi-label volume and outputs the corresponding binary image

gaussianBlur() method descriptor

gaussianBlur(self: shapeworks_py.Image, sigma: float = 0.0) -> shapeworks_py.Image

applies gaussian blur

isolate() method descriptor

isolate(self: shapeworks_py.Image) -> shapeworks_py.Image

isolate largest object

logicalBoundingBox() method descriptor

logicalBoundingBox(self: shapeworks_py.Image) -> shapeworks::IndexRegion

returns the index coordinates of this image's region

logicalToPhysical() method descriptor

logicalToPhysical(args, *kwargs) Overloaded function.

  1. logicalToPhysical(self: shapeworks_py.Image, region: shapeworks::IndexRegion) -> shapeworks::PhysicalRegion

converts from a logical region (index coordinates) to a physical region

  1. logicalToPhysical(self: shapeworks_py.Image, c: List[int]) -> numpy.ndarray

converts a logical (index) coordinate to physical space

max() method descriptor

max(self: shapeworks_py.Image) -> float

maximum of image

mean() method descriptor

mean(self: shapeworks_py.Image) -> float

mean of image

min() method descriptor

min(self: shapeworks_py.Image) -> float

minimum of image

origin() method descriptor

origin(self: shapeworks_py.Image) -> numpy.ndarray

physical coordinates of image origin

pad() method descriptor

pad(args, *kwargs) Overloaded function.

  1. pad(self: shapeworks_py.Image, pad: int, value: float = 0.0) -> shapeworks_py.Image

pads an image by same number of pixels in all directions with constant value

  1. pad(self: shapeworks_py.Image, padx: int, pady: int, padz: int, value: float = 0.0) -> shapeworks_py.Image

pads an image by desired number of pixels in each direction with constant value

  1. pad(self: shapeworks_py.Image, region: shapeworks::IndexRegion, value: float = 0.0) -> shapeworks_py.Image

pads an image to include the given region with constant value

physicalBoundingBox() method descriptor

physicalBoundingBox(self: shapeworks_py.Image, isovalue: float = 1.0) -> shapeworks::PhysicalRegion

returns region of physical space occupied by the region of data <= the given isoValue

physicalToLogical() method descriptor

physicalToLogical(args, *kwargs) Overloaded function.

  1. physicalToLogical(self: shapeworks_py.Image, region: shapeworks::PhysicalRegion) -> shapeworks::IndexRegion

converts from a physical region to a logical region (index coordinates)

  1. physicalToLogical(self: shapeworks_py.Image, p: List[float]) -> numpy.ndarray

converts a physical coordinate to a logical (index) space

physicalboundingBox() method descriptor

physicalboundingBox(self: shapeworks_py.Image) -> shapeworks::PhysicalRegion

returns region of physical space occupied by this image

recenter() method descriptor

recenter(self: shapeworks_py.Image) -> shapeworks_py.Image

recenters an image by changing its origin in the image header to the physical coordinates of the center of the image

reflect() method descriptor

reflect(self: shapeworks_py.Image, axis: shapeworks_py.Axis) -> shapeworks_py.Image

reflect image with respect to logical image center and the specified axis

resample() method descriptor

resample(args, *kwargs) Overloaded function.

  1. resample(self: shapeworks_py.Image, transform: numpy.ndarray[numpy.float64[4, 4]], origin: List[float], dims: List[int], spacing: List[float], direction: numpy.ndarray[numpy.float64[3, 3]], interp: shapeworks_py.InterpolationType = ) -> shapeworks_py.Image

resamples by applying transform then sampling from given origin along direction axes at spacing physical units per pixel for dims pixels using specified interpolator

  1. resample(self: shapeworks_py.Image, physicalSpacing: List[float], interp: shapeworks_py.InterpolationType = ) -> shapeworks_py.Image

resamples image using new physical spacing, updating logical dims to keep all image data for this spacing

  1. resample(self: shapeworks_py.Image, isoSpacing: float = 1.0, interp: shapeworks_py.InterpolationType = ) -> shapeworks_py.Image

isotropically resamples image using giving isospacing

resize() method descriptor

resize(self: shapeworks_py.Image, logicalDims: List[int], interp: shapeworks_py.InterpolationType = ) -> shapeworks_py.Image

change logical dims (computes new physical spacing)

rotate() method descriptor

rotate(args, *kwargs) Overloaded function.

  1. rotate(self: shapeworks_py.Image, angle: float, axis: itk::Vector) -> shapeworks_py.Image

rotate around center (not origin) using axis (default z-axis) by angle (in radians)

  1. rotate(self: shapeworks_py.Image, angle: float, axis: shapeworks_py.Axis) -> shapeworks_py.Image

rotate around center (not origin) using axis (default z-axis) by angle (in radians)

  1. rotate(self: shapeworks_py.Image, angle: float, axis: List[float]) -> shapeworks_py.Image

rotate around center (not origin) using axis (default z-axis) by angle (in radians)

scale() method descriptor

scale(self: shapeworks_py.Image, scale_vec: List[float]) -> shapeworks_py.Image

scale image by scale_vec around center (not origin)

setCoordsys() method descriptor

setCoordsys(self: shapeworks_py.Image, coordsys: numpy.ndarray[numpy.float64[3, 3]] = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]) -> shapeworks_py.Image

sets the orientation of this image

setOrigin() method descriptor

setOrigin(self: shapeworks_py.Image, origin: List[float] = [0.0, 0.0, 0.0]) -> shapeworks_py.Image

sets the image origin in physical space to the given value

setSpacing() method descriptor

setSpacing(self: shapeworks_py.Image, spacing: List[float] = [1.0, 1.0, 1.0]) -> shapeworks_py.Image

set image spacing, the size of each pixel

size() method descriptor

size(self: shapeworks_py.Image) -> numpy.ndarray

physical dimensions of the image (dims * spacing)

spacing() method descriptor

spacing(self: shapeworks_py.Image) -> numpy.ndarray

physical spacing of the image

std() method descriptor

std(self: shapeworks_py.Image) -> float

standard deviation of image

toArray() method descriptor

toArray(self: shapeworks_py.Image, copy: bool = False, for_viewing: bool = False) -> numpy.ndarray

returns raw array of image data, directly sharing data by default, copying if specified. NOTE: many Image operations reallocate image array, so while the array returned from this function is writable, it is best used immediately for Python operations; use for_viewing argument to get array in column-major ('F') order ('sw2vtkImage' already does this).

toMesh() method descriptor

toMesh(self: shapeworks_py.Image, isovalue: float) -> shapeworks::Mesh

converts image to mesh at specified isovalue

topologyPreservingSmooth() method descriptor

topologyPreservingSmooth(self: shapeworks_py.Image, scaling: float = 20.0, sigmoidAlpha: float = 10.5, sigmoidBeta: float = 10.0) -> shapeworks_py.Image

creates a feature image (by applying gradient then sigmoid filters), then passes it to the TPLevelSet filter [curvature flow filter is often applied to the image before this filter]

translate() method descriptor

translate(self: shapeworks_py.Image, v: List[float]) -> shapeworks_py.Image

translates image

write() method descriptor

write(self: shapeworks_py.Image, filename: str, compressed: bool = True) -> shapeworks_py.Image

writes the current image (determines type by its extension)

ImageUtils(args, kwargs)

Bases: pybind11_object

boundingBox() staticmethod

boundingBox(args, *kwargs) Overloaded function.

  1. boundingBox(filenames: List[str], isoValue: float = 1.0) -> shapeworks_py.PhysicalRegion

compute largest bounding box surrounding the specified isovalue of the specified set of filenames

  1. boundingBox(images: List[shapeworks_py.Image], isoValue: float = 1.0) -> shapeworks_py.PhysicalRegion

compute largest bounding box surrounding the specified isovalue of the specified set of images

createWarpTransform() staticmethod

createWarpTransform(source_landmarks: str, target_landmarks: str, stride: int = 1) -> shapeworks_py.WarpTransform

computes a warp transform from the source to the target landmarks (in the given files) using every stride points

IndexRegion()

Bases: pybind11_object

  1. init(self: shapeworks_py.IndexRegion) -> None

  2. init(self: shapeworks_py.IndexRegion, arg0: List[float], arg1: List[float]) -> None

  3. init(self: shapeworks_py.IndexRegion, arg0: List[float]) -> None

max property

max point of region

min property

min point of region

origin() method descriptor

origin(self: shapeworks_py.IndexRegion) -> numpy.ndarray

return origin of region

pad() method descriptor

pad(self: shapeworks_py.IndexRegion, padding: int) -> shapeworks_py.IndexRegion

grows or shrinks the region by the specified amount

size() method descriptor

size(self: shapeworks_py.IndexRegion) -> numpy.ndarray

return size of region

valid() method descriptor

valid(self: shapeworks_py.IndexRegion) -> bool

ensure if region is valid

InterpolationType()

Bases: pybind11_object

Members:

Linear

NearestNeighbor

Linear = <InterpolationType.Linear: 0>

Members:

Linear

NearestNeighbor

NearestNeighbor = <InterpolationType.NearestNeighbor: 1>

Members:

Linear

NearestNeighbor

name property

name(self: handle) -> str

Mesh()

Bases: pybind11_object

  1. init(self: shapeworks_py.Mesh, arg0: str) -> None

  2. init(self: shapeworks_py.Mesh, arg0: vtkSmartPointer) -> None

  3. init(self: shapeworks_py.Mesh, arg0: numpy.ndarray[numpy.float64[m, n]], arg1: numpy.ndarray[numpy.int32[m, n]]) -> None

Affine = <AlignmentType.Affine: 2>

Members:

Rigid

Similarity

Affine

Butterfly = <SubdivisionType.Butterfly: 0>

Members:

Butterfly

Loop

Face = <FieldType.Face: 1>

Members:

Point

Face

Gaussian = <CurvatureType.Gaussian: 1>

Members:

Principal

Gaussian

Mean

Loop = <SubdivisionType.Loop: 1>

Members:

Butterfly

Loop

Mean = <CurvatureType.Mean: 2>

Members:

Principal

Gaussian

Mean

Point = <FieldType.Point: 0>

Members:

Point

Face

PointToCell = <DistanceMethod.PointToCell: 1>

Members:

PointToPoint

PointToCell

PointToPoint = <DistanceMethod.PointToPoint: 0>

Members:

PointToPoint

PointToCell

Principal = <CurvatureType.Principal: 0>

Members:

Principal

Gaussian

Mean

Rigid = <AlignmentType.Rigid: 0>

Members:

Rigid

Similarity

Affine

Similarity = <AlignmentType.Similarity: 1>

Members:

Rigid

Similarity

Affine

AlignmentType()

Bases: pybind11_object

Members:

Rigid

Similarity

Affine

Affine = <AlignmentType.Affine: 2>

Members:

Rigid

Similarity

Affine

Rigid = <AlignmentType.Rigid: 0>

Members:

Rigid

Similarity

Affine

Similarity = <AlignmentType.Similarity: 1>

Members:

Rigid

Similarity

Affine

name property

name(self: handle) -> str

CurvatureType()

Bases: pybind11_object

Members:

Principal

Gaussian

Mean

Gaussian = <CurvatureType.Gaussian: 1>

Members:

Principal

Gaussian

Mean

Mean = <CurvatureType.Mean: 2>

Members:

Principal

Gaussian

Mean

Principal = <CurvatureType.Principal: 0>

Members:

Principal

Gaussian

Mean

name property

name(self: handle) -> str

DistanceMethod()

Bases: pybind11_object

Members:

PointToPoint

PointToCell

PointToCell = <DistanceMethod.PointToCell: 1>

Members:

PointToPoint

PointToCell

PointToPoint = <DistanceMethod.PointToPoint: 0>

Members:

PointToPoint

PointToCell

name property

name(self: handle) -> str

FieldType()

Bases: pybind11_object

Members:

Point

Face

Face = <FieldType.Face: 1>

Members:

Point

Face

Point = <FieldType.Point: 0>

Members:

Point

Face

name property

name(self: handle) -> str

SubdivisionType()

Bases: pybind11_object

Members:

Butterfly

Loop

Butterfly = <SubdivisionType.Butterfly: 0>

Members:

Butterfly

Loop

Loop = <SubdivisionType.Loop: 1>

Members:

Butterfly

Loop

name property

name(self: handle) -> str

applySubdivisionFilter() method descriptor

applySubdivisionFilter(self: shapeworks_py.Mesh, type: shapeworks_py.Mesh.SubdivisionType = , subdivision: int = 1) -> shapeworks_py.Mesh

applies subdivision filter (butterfly (default) or loop)

applyTransform() method descriptor

applyTransform(self: shapeworks_py.Mesh, transform: numpy.ndarray[numpy.float64[4, 4]], imageTransform: bool = False) -> shapeworks_py.Mesh

applies the given transformation to the mesh

boundingBox() method descriptor

boundingBox(self: shapeworks_py.Mesh) -> shapeworks_py.PhysicalRegion

computes bounding box of current mesh

center() method descriptor

center(self: shapeworks_py.Mesh) -> numpy.ndarray

center of mesh

centerOfMass() method descriptor

centerOfMass(self: shapeworks_py.Mesh) -> numpy.ndarray

center of mass of mesh

clip() method descriptor

clip(args, *kwargs) Overloaded function.

  1. clip(self: shapeworks_py.Mesh, point: List[float], normal: List[float]) -> shapeworks_py.Mesh

clips a mesh using a cutting plane

  1. clip(self: shapeworks_py.Mesh, o: List[float], p1: List[float], p2: List[float]) -> shapeworks_py.Mesh

clips a mesh using a cutting plane

clipClosedSurface() method descriptor

clipClosedSurface(self: shapeworks_py.Mesh, point: List[float], normal: List[float]) -> shapeworks_py.Mesh

clips a mesh using a cutting plane resulting in a closed surface

closestPoint() method descriptor

closestPoint(self: shapeworks_py.Mesh, point: List[float]) -> tuple

returns closest point to given point on mesh

closestPointId() method descriptor

closestPointId(self: shapeworks_py.Mesh, point: List[float]) -> int

returns closest point id in this mesh to the given point in space

compareField() method descriptor

compareField(self: shapeworks_py.Mesh, other_mesh: shapeworks_py.Mesh, name1: str, name2: str = '', eps: float = -1.0) -> bool

compares two meshes based on fields

computeNormals() method descriptor

computeNormals(self: shapeworks_py.Mesh) -> shapeworks_py.Mesh

computes and adds oriented point and cell normals

computeThickness() method descriptor

computeThickness(self: shapeworks_py.Mesh, ct: shapeworks_py.Image, dt: shapeworks_py.Image = None, maxDist: float = 10000, medianRadius: float = 5.0, distanceMesh: str = '') -> shapeworks_py.Mesh

Computes cortical thickness

copy() method descriptor

copy(self: shapeworks_py.Mesh) -> shapeworks_py.Mesh

coverage() method descriptor

coverage(self: shapeworks_py.Mesh, otherMesh: shapeworks_py.Mesh, allowBackIntersections: bool = True, angleThreshold: float = 0, backSearchRadius: float = 0) -> shapeworks_py.Mesh

determines coverage between current mesh and another mesh (e.g. acetabular cup / femoral head)

createTransform() method descriptor

createTransform(self: shapeworks_py.Mesh, target: shapeworks_py.Mesh, align: shapeworks_py.Mesh.AlignmentType = , iterations: int = 10) -> numpy.ndarray[numpy.float64[4, 4]]

creates a transform using specified AlignmentType (Mesh.Rigid, Mesh.Similarity, Mesh.Affine) for specified number of iterations (default alignment: Similarity, default iterations: 10)

curvature() method descriptor

curvature(self: shapeworks_py.Mesh, type: shapeworks_py.Mesh.CurvatureType = ) -> numpy.ndarray

computes and adds curvature (principal (default) or gaussian or mean)

distance() method descriptor

distance(self: shapeworks_py.Mesh, target: shapeworks_py.Mesh, method: shapeworks_py.Mesh.DistanceMethod = ) -> tuple

computes closest distance from vertices of this mesh to target mesh, returning indices of faces or vertices in target mesh that contain closest points

faces() method descriptor

faces(self: shapeworks_py.Mesh) -> numpy.ndarray[numpy.int32[m, n]]

matrix with number of faces with indices of the three points from which each face is composed

fillHoles() method descriptor

fillHoles(self: shapeworks_py.Mesh, hole_size: float = 1000) -> shapeworks_py.Mesh

finds holes in a mesh and closes them

fixElement() method descriptor

fixElement(self: shapeworks_py.Mesh) -> shapeworks_py.Mesh

fix element winding of mesh

geodesicDistance() method descriptor

geodesicDistance(args, *kwargs) Overloaded function.

  1. geodesicDistance(self: shapeworks_py.Mesh, source: int, target: int) -> float

computes geodesic distance between two vertices (specified by their indices) on mesh

  1. geodesicDistance(self: shapeworks_py.Mesh, landmark: List[float]) -> numpy.ndarray

computes geodesic distance between a point (landmark) and each vertex on mesh

  1. geodesicDistance(self: shapeworks_py.Mesh, curve: List[List[float]]) -> numpy.ndarray

computes geodesic distance between a set of points (curve) and all vertices on mesh

getFace() method descriptor

getFace(self: shapeworks_py.Mesh, id: int) -> numpy.ndarray

return indices of the three points with which the face at the given index is composed

getField() method descriptor

getField(self: shapeworks_py.Mesh, name: str, type: shapeworks_py.Mesh.FieldType) -> numpy.ndarray

gets the field

getFieldNames() method descriptor

getFieldNames(self: shapeworks_py.Mesh) -> List[str]

print all field names in mesh

getFieldValue() method descriptor

getFieldValue(self: shapeworks_py.Mesh, idx: str, name: int) -> float

gets the value at the given index of field

getMultiFieldValue() method descriptor

getMultiFieldValue(self: shapeworks_py.Mesh, idx: str, name: int) -> numpy.ndarray[numpy.float64[m, 1]]

gets the vector value at the given index of field

getPoint() method descriptor

getPoint(self: shapeworks_py.Mesh, id: int) -> numpy.ndarray

(x,y,z) coordinates of vertex at given index

interpolateFieldAtPoint() method descriptor

interpolateFieldAtPoint(self: shapeworks_py.Mesh, field: str, point: List[float]) -> float

Interpolate the feature at the location using barycentric coordinate

interpolate_scalars_to_mesh() method descriptor

interpolate_scalars_to_mesh(self: shapeworks_py.Mesh, name: str, positions: numpy.ndarray[numpy.float64[m, 1]], scalar_values: numpy.ndarray[numpy.float64[m, 1]]) -> None

Interpolate scalars to mesh

invertNormals() method descriptor

invertNormals(self: shapeworks_py.Mesh) -> shapeworks_py.Mesh

handle flipping normals

numFaces() method descriptor

numFaces(self: shapeworks_py.Mesh) -> int

number of faces

numPoints() method descriptor

numPoints(self: shapeworks_py.Mesh) -> int

number of points

points() method descriptor

points(self: shapeworks_py.Mesh) -> numpy.ndarray[numpy.float64[m, n]]

matrix with number of points with (x,y,z) coordinates of each point

probeVolume() method descriptor

probeVolume(self: shapeworks_py.Mesh, image: shapeworks_py.Image) -> shapeworks_py.Mesh

samples image data values at point locations specified by image

reflect() method descriptor

reflect(self: shapeworks_py.Mesh, axis: shapeworks_py.Axis, origin: List[float] = [0.0, 0.0, 0.0]) -> shapeworks_py.Mesh

reflect meshes with respect to a specified center and specific axis

remesh() method descriptor

remesh(self: shapeworks_py.Mesh, numVertices: int, adaptivity: float) -> shapeworks_py.Mesh

applies remeshing using approximated centroidal voronoi diagrams for a given number of vertices and adaptivity

remeshPercent() method descriptor

remeshPercent(self: shapeworks_py.Mesh, percentage: float, adaptivity: float) -> shapeworks_py.Mesh

applies remeshing using approximated centroidal voronoi diagrams for a given percentage of vertices and adaptivity

rotate() method descriptor

rotate(self: shapeworks_py.Mesh, angle: float, axis: shapeworks_py.Axis) -> shapeworks_py.Mesh

rotate using axis by angle (in degrees)

scale() method descriptor

scale(self: shapeworks_py.Mesh, v: List[float]) -> shapeworks_py.Mesh

scale mesh

setField() method descriptor

setField(self: shapeworks_py.Mesh, name: str, array: numpy.ndarray, type: shapeworks_py.Mesh.FieldType) -> shapeworks_py.Mesh

sets the given field for points with array

setFieldValue() method descriptor

setFieldValue(self: shapeworks_py.Mesh, idx: str, value: int, name: float = '') -> None

sets the given index of field to value

smooth() method descriptor

smooth(self: shapeworks_py.Mesh, iterations: int = 0, relaxation: float = 0.0) -> shapeworks_py.Mesh

applies laplacian smoothing

smoothSinc() method descriptor

smoothSinc(self: shapeworks_py.Mesh, iterations: int = 0, passband: float = 0.0) -> shapeworks_py.Mesh

applies windowed sinc smoothing

toDistanceTransform() method descriptor

toDistanceTransform(self: shapeworks_py.Mesh, region: shapeworks_py.PhysicalRegion = { min: [1e+09, 1e+09, 1e+09], max: [-1e+09, -1e+09, -1e+09] }, spacing: List[float] = [1.0, 1.0, 1.0], padding: List[int] = [1, 1, 1]) -> shapeworks_py.Image

converts specified region to distance transform image with specified spacing and padding (default: unit spacing and 1 pixel of padding)

toImage() method descriptor

toImage(self: shapeworks_py.Mesh, region: shapeworks_py.PhysicalRegion = { min: [1e+09, 1e+09, 1e+09], max: [-1e+09, -1e+09, -1e+09] }, spacing: List[float] = [1.0, 1.0, 1.0]) -> shapeworks_py.Image

rasterizes specified region to create binary image of desired dims (default: unit spacing)

translate() method descriptor

translate(self: shapeworks_py.Mesh, v: List[float]) -> shapeworks_py.Mesh

translates mesh

write() method descriptor

write(self: shapeworks_py.Mesh, pathname: str, binaryFile: bool = False) -> shapeworks_py.Mesh

writes mesh, format specified by filename extension

MeshUtils(args, kwargs)

Bases: pybind11_object

boundaryLoopExtractor() staticmethod

boundaryLoopExtractor(mesh: shapeworks_py.Mesh) -> shapeworks_py.Mesh

for a mesh extracts the boundary loop and export the boundary loop as a contour .vtp file

boundingBox() staticmethod

boundingBox(args, *kwargs) Overloaded function.

  1. boundingBox(filenames: List[str], center: bool = False) -> shapeworks_py.PhysicalRegion

calculate bounding box incrementally for meshes

  1. boundingBox(meshes: List[shapeworks_py.Mesh], center: bool = False) -> shapeworks_py.PhysicalRegion

calculate bounding box incrementally for meshes

computeMeanNormals() staticmethod

computeMeanNormals(args, *kwargs) Overloaded function.

  1. computeMeanNormals(filenames: List[str], autoGenerateNormals: bool = True) -> numpy.ndarray

computes average normals for each point in given set of meshes

  1. computeMeanNormals(meshes: List[shapeworks_py.Mesh]) -> numpy.ndarray

computes average normals for each point in given set of meshes

findReferenceMesh() staticmethod

findReferenceMesh(meshes: List[shapeworks_py.Mesh], random_subset: int = -1) -> int

find reference mesh from a set of meshes

generateNormals() staticmethod

generateNormals(meshes: List[shapeworks_py.Mesh], forceRegen: bool = False) -> None

generates and adds normals for points and faces for each mesh in given set of meshes

sharedBoundaryExtractor() staticmethod

sharedBoundaryExtractor(mesh_l: shapeworks_py.Mesh, mesh_r: shapeworks_py.Mesh, tol: float = 0.001) -> tuple

extract the shared boundary for the given left and right meshes and save the individual meshes

MeshWarper()

Bases: pybind11_object

buildMesh() method descriptor

buildMesh(self: shapeworks_py.MeshWarper, particles: numpy.ndarray[numpy.float64[m, n]]) -> shapeworks_py.Mesh

Build the mesh from particle positions (matrix [Nx3])

extractLandmarks() method descriptor

extractLandmarks(self: shapeworks_py.MeshWarper, warped_mesh: shapeworks_py.Mesh) -> numpy.ndarray[numpy.float64[m, n]]

Extract the landmarks from the warped mesh and return the landmarks (matrix [Nx3])

generateWarp() method descriptor

generateWarp(args, *kwargs) Overloaded function.

  1. generateWarp(self: shapeworks_py.MeshWarper, reference_mesh: shapeworks_py.Mesh, reference_particles: numpy.ndarray[numpy.float64[m, n]]) -> bool

Assign the reference mesh/particles (matrix [Nx3]) and pre-compute the warping

  1. generateWarp(self: shapeworks_py.MeshWarper, reference_mesh: shapeworks_py.Mesh, reference_particles: numpy.ndarray[numpy.float64[m, n]], landmarks: numpy.ndarray[numpy.float64[m, n]]) -> bool

Assign the reference mesh/particles (matrix [Nx3]) and landmarks (matrix [Nx3]) and pre-compute the warping

getGoodParticlesIndices() method descriptor

getGoodParticlesIndices(self: shapeworks_py.MeshWarper) -> List[int]

Return the indexes of good particles.

getLandmarksMap() method descriptor

getLandmarksMap(self: shapeworks_py.MeshWarper) -> Dict[int, int]

Return the map of landmarks to vertices.

getReferenceMesh() method descriptor

getReferenceMesh(self: shapeworks_py.MeshWarper) -> shapeworks_py.Mesh

Return the mesh used for warping.

getReferenceParticles() method descriptor

getReferenceParticles(self: shapeworks_py.MeshWarper) -> numpy.ndarray[numpy.float64[m, n]]

Return the particles used for warping.

getWarpMatrix() method descriptor

getWarpMatrix(self: shapeworks_py.MeshWarper) -> numpy.ndarray[numpy.float64[m, n]]

Return the warping matrix (Vertices = Warp * Control).

hasBadParticles() method descriptor

hasBadParticles(self: shapeworks_py.MeshWarper) -> bool

Return true if warping has removed any bad particle(s).

prepareMesh() staticmethod

prepareMesh(mesh: shapeworks_py.Mesh) -> shapeworks_py.Mesh

Return the prepared mesh used for warping (before vertices were inserted).

Optimize()

Bases: pybind11_object

GetParticleSystem() method descriptor

GetParticleSystem(self: shapeworks_py.Optimize) -> numpy.ndarray[numpy.float64[m, n]]

LoadParameterFile() method descriptor

LoadParameterFile(self: shapeworks_py.Optimize, arg0: str) -> bool

Run() method descriptor

Run(self: shapeworks_py.Optimize) -> bool

SetIterationCallbackFunction() method descriptor

SetIterationCallbackFunction(self: shapeworks_py.Optimize, arg0: Callable[[], None]) -> None

SetUpOptimize() method descriptor

SetUpOptimize(self: shapeworks_py.Optimize, projectFile: shapeworks::Project) -> bool

Parameters()

Bases: pybind11_object

as_map() method descriptor

as_map(self: shapeworks_py.Parameters) -> Dict[str, str]

get underlying map

get() method descriptor

get(self: shapeworks_py.Parameters, key: str, default: str = '') -> str

get a parameter based on a key, return default if it doesn't exist

key_exists() method descriptor

key_exists(self: shapeworks_py.Parameters, key: str) -> bool

return if a key exists or not

remove_entry() method descriptor

remove_entry(self: shapeworks_py.Parameters, key: str) -> None

remove an entry

reset_parameters() method descriptor

reset_parameters(self: shapeworks_py.Parameters) -> None

reset parameters to blank

set() method descriptor

set(args, *kwargs) Overloaded function.

  1. set(self: shapeworks_py.Parameters, key: str, Variant: shapeworks::Variant) -> None

set a parameter based on a key

  1. set(self: shapeworks_py.Parameters, key: str, value: str) -> None

set a parameter based on a key

ParticleShapeStatistics()

Bases: pybind11_object

PCA() method descriptor

PCA(self: shapeworks_py.ParticleShapeStatistics, particleSystem: shapeworks_py.ParticleSystem, domainsPerShape: int = 1) -> int

calculates the eigen values and eigen vectors of the data

eigenValues() method descriptor

eigenValues(self: shapeworks_py.ParticleShapeStatistics) -> List[float]

return the eigen values

eigenVectors() method descriptor

eigenVectors(self: shapeworks_py.ParticleShapeStatistics) -> numpy.ndarray[numpy.float64[m, n]]

returns the eigenvectors

numDims() method descriptor

numDims(self: shapeworks_py.ParticleShapeStatistics) -> int

returns the number of features of the particle system

pcaLoadings() method descriptor

pcaLoadings(self: shapeworks_py.ParticleShapeStatistics) -> numpy.ndarray[numpy.float64[m, n]]

returns the coefficients of the linear combination of the original variables from which the principal components are constructed

percentVarByMode() method descriptor

percentVarByMode(self: shapeworks_py.ParticleShapeStatistics) -> List[float]

return the variance accounted for by the principal components

principalComponentProjections() method descriptor

principalComponentProjections(self: shapeworks_py.ParticleShapeStatistics) -> int

projects the original data on the calculated principal components

sampleSize() method descriptor

sampleSize(self: shapeworks_py.ParticleShapeStatistics) -> int

returns the sample size of the particle system

ParticleSystem()

Bases: pybind11_object

D() method descriptor

D(self: shapeworks_py.ParticleSystem) -> int

EvaluationCompare() method descriptor

EvaluationCompare(self: shapeworks_py.ParticleSystem, arg0: shapeworks_py.ParticleSystem) -> bool

ExactCompare() method descriptor

ExactCompare(self: shapeworks_py.ParticleSystem, arg0: shapeworks_py.ParticleSystem) -> bool

N() method descriptor

N(self: shapeworks_py.ParticleSystem) -> int

Particles() method descriptor

Particles(self: shapeworks_py.ParticleSystem) -> numpy.ndarray[numpy.float64[m, n]]

Paths() method descriptor

Paths(self: shapeworks_py.ParticleSystem) -> List[str]

ShapeAsPointSet() method descriptor

ShapeAsPointSet(self: shapeworks_py.ParticleSystem, id_shape: int) -> numpy.ndarray[numpy.float64[m, n]]

Return the particle pointset [Nx3] of the specified shape

PhysicalRegion()

Bases: pybind11_object

  1. init(self: shapeworks_py.PhysicalRegion) -> None

  2. init(self: shapeworks_py.PhysicalRegion, arg0: List[float], arg1: List[float]) -> None

  3. init(self: shapeworks_py.PhysicalRegion, arg0: str) -> None

max property

max point of region

min property

min point of region

expand() method descriptor

expand(args, *kwargs) Overloaded function.

  1. expand(self: shapeworks_py.PhysicalRegion, other: shapeworks_py.PhysicalRegion) -> shapeworks_py.PhysicalRegion

expand this region up to the largest portions of both

  1. expand(self: shapeworks_py.PhysicalRegion, point: itk::Point) -> shapeworks_py.PhysicalRegion

expand this region to include this point

origin() method descriptor

origin(self: shapeworks_py.PhysicalRegion) -> numpy.ndarray

return origin of region

pad() method descriptor

pad(self: shapeworks_py.PhysicalRegion, padding: float) -> shapeworks_py.PhysicalRegion

grows or shrinks the region by the specified amount

shrink() method descriptor

shrink(self: shapeworks_py.PhysicalRegion, other: shapeworks_py.PhysicalRegion) -> shapeworks_py.PhysicalRegion

shrink this region down to the smallest portions of both

size() method descriptor

size(self: shapeworks_py.PhysicalRegion) -> numpy.ndarray

return size of region

to_string() method descriptor

to_string(self: shapeworks_py.PhysicalRegion) -> str

returns a string representation of this region

valid() method descriptor

valid(self: shapeworks_py.PhysicalRegion) -> bool

ensure if region is valid

Project()

Bases: pybind11_object

clear_parameters() method descriptor

clear_parameters(self: shapeworks_py.Project, name: str) -> None

get_domain_names() method descriptor

get_domain_names(self: shapeworks_py.Project) -> List[str]

Return the domain names (e.g. femur, pelvis, etc)

get_feature_names() method descriptor

get_feature_names(self: shapeworks_py.Project) -> List[str]

get_filename() method descriptor

get_filename(self: shapeworks_py.Project) -> str

Return the filename

get_groomed_domain_types() method descriptor

get_groomed_domain_types(self: shapeworks_py.Project) -> List[shapeworks_py.DomainType]

Return the groomed domain types

get_groomed_present() method descriptor

get_groomed_present(self: shapeworks_py.Project) -> bool

Return if groomed files are present

get_group_names() method descriptor

get_group_names(self: shapeworks_py.Project) -> List[str]

get_group_values() method descriptor

get_group_values(self: shapeworks_py.Project, group_names: str) -> List[str]

get_headers() method descriptor

get_headers(self: shapeworks_py.Project) -> List[str]

Return the headers of the subject sheet

get_images_present() method descriptor

get_images_present(self: shapeworks_py.Project) -> bool

get_number_of_domains_per_subject() method descriptor

get_number_of_domains_per_subject(self: shapeworks_py.Project) -> int

Return the number of domains

get_number_of_subjects() method descriptor

get_number_of_subjects(self: shapeworks_py.Project) -> int

Return the number of subjects in the project

get_original_domain_types() method descriptor

get_original_domain_types(self: shapeworks_py.Project) -> List[shapeworks_py.DomainType]

Return the original domain types

get_originals_present() method descriptor

get_originals_present(self: shapeworks_py.Project) -> bool

Return if original files are present

get_parameters() method descriptor

get_parameters(self: shapeworks_py.Project, name: str, domain_name: str = '') -> shapeworks::Parameters

get_particles_present() method descriptor

get_particles_present(self: shapeworks_py.Project) -> bool

Return if particle files are present

get_project_path() method descriptor

get_project_path(self: shapeworks_py.Project) -> str

Return the project path

get_string_column() method descriptor

get_string_column(self: shapeworks_py.Project, name: str) -> List[str]

Return a column by name

get_subjects() method descriptor

get_subjects(self: shapeworks_py.Project) -> List[shapeworks::Subject]

Return the list of Subjects

get_supported_version() method descriptor

get_supported_version(self: shapeworks_py.Project) -> int

get_version() method descriptor

get_version(self: shapeworks_py.Project) -> int

load() method descriptor

load(self: shapeworks_py.Project, filename: str) -> bool

Load from XLSX file

save() method descriptor

save(self: shapeworks_py.Project, filename: str = '') -> None

Save to XLSX file

set_filename() method descriptor

set_filename(self: shapeworks_py.Project, filename: str) -> None

Set project filename

set_groomed_domain_types() method descriptor

set_groomed_domain_types(self: shapeworks_py.Project, types: List[shapeworks_py.DomainType]) -> None

Set the groomed domain types

set_original_domain_types() method descriptor

set_original_domain_types(self: shapeworks_py.Project, types: List[shapeworks_py.DomainType]) -> None

Set the original domain types

set_parameters() method descriptor

set_parameters(self: shapeworks_py.Project, name: str, params: shapeworks::Parameters, domain_name: str = '') -> None

set_subjects() method descriptor

set_subjects(self: shapeworks_py.Project, subjects: List[shapeworks::Subject]) -> None

store_subjects() method descriptor

store_subjects(self: shapeworks_py.Project) -> None

ReconstructSurface_RBFSSparseTransform()

Bases: pybind11_object

  1. init(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform) -> None

  2. init(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, arg0: str, arg1: str, arg2: str) -> None

meanSurface() method descriptor

meanSurface(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, distanceTransformFiles: List[str], localPointsFiles: List[str], worldPointsFiles: List[str]) -> None

samplesAlongPCAModes() method descriptor

samplesAlongPCAModes(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, worldPointsFiles: List[str]) -> None

setDoProcrustes() method descriptor

setDoProcrustes(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, doProcrustes: bool) -> None

setDoProcrustesScaling() method descriptor

setDoProcrustesScaling(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, doProcrustesScaling: bool) -> None

setEnableOutput() method descriptor

setEnableOutput(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, enableOutput: bool) -> None

setMaxAngleDegrees() method descriptor

setMaxAngleDegrees(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, maxAngleDegrees: float) -> None

setMaxStdDev() method descriptor

setMaxStdDev(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, maxStdDev: float) -> None

setMaxVarianceCaptured() method descriptor

setMaxVarianceCaptured(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, maxVarianceCaptured: float) -> None

setMeanBeforeWarp() method descriptor

setMeanBeforeWarp(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, meanBeforeWarp: bool) -> None

setModeIndex() method descriptor

setModeIndex(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, modeIndex: int) -> None

setNumOfClusters() method descriptor

setNumOfClusters(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, numOfClusters: int) -> None

setNumOfModes() method descriptor

setNumOfModes(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, numOfModes: int) -> None

setNumOfParticles() method descriptor

setNumOfParticles(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, numOfParticles: int) -> None

setNumOfSamplesPerMode() method descriptor

setNumOfSamplesPerMode(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, numOfSamplesPerMode: int) -> None

setOutPath() method descriptor

setOutPath(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, path: str) -> None

setOutPrefix() method descriptor

setOutPrefix(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, prefix: str) -> None

surface() method descriptor

surface(self: shapeworks_py.ReconstructSurface_RBFSSparseTransform, localPointsFiles: List[str]) -> None

ReconstructSurface_ThinPlateSplineTransform()

Bases: pybind11_object

  1. init(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform) -> None

  2. init(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, arg0: str, arg1: str, arg2: str) -> None

meanSurface() method descriptor

meanSurface(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, distanceTransformFiles: List[str], localPointsFiles: List[str], worldPointsFiles: List[str]) -> None

samplesAlongPCAModes() method descriptor

samplesAlongPCAModes(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, worldPointsFiles: List[str]) -> None

setDoProcrustes() method descriptor

setDoProcrustes(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, doProcrustes: bool) -> None

setDoProcrustesScaling() method descriptor

setDoProcrustesScaling(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, doProcrustesScaling: bool) -> None

setEnableOutput() method descriptor

setEnableOutput(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, enableOutput: bool) -> None

setMaxAngleDegrees() method descriptor

setMaxAngleDegrees(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, maxAngleDegrees: float) -> None

setMaxStdDev() method descriptor

setMaxStdDev(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, maxStdDev: float) -> None

setMaxVarianceCaptured() method descriptor

setMaxVarianceCaptured(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, maxVarianceCaptured: float) -> None

setMeanBeforeWarp() method descriptor

setMeanBeforeWarp(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, meanBeforeWarp: bool) -> None

setModeIndex() method descriptor

setModeIndex(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, modeIndex: int) -> None

setNumOfClusters() method descriptor

setNumOfClusters(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, numOfClusters: int) -> None

setNumOfModes() method descriptor

setNumOfModes(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, numOfModes: int) -> None

setNumOfParticles() method descriptor

setNumOfParticles(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, numOfParticles: int) -> None

setNumOfSamplesPerMode() method descriptor

setNumOfSamplesPerMode(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, numOfSamplesPerMode: int) -> None

setOutPath() method descriptor

setOutPath(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, path: str) -> None

setOutPrefix() method descriptor

setOutPrefix(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, prefix: str) -> None

surface() method descriptor

surface(self: shapeworks_py.ReconstructSurface_ThinPlateSplineTransform, localPointsFiles: List[str]) -> None

ShapeEvaluation(args, kwargs)

Bases: pybind11_object

ComputeCompactness() staticmethod

ComputeCompactness(particleSystem: shapeworks_py.ParticleSystem, nModes: int, saveTo: str = '') -> float

Computes the compactness measure for a particle system

ComputeFullCompactness() staticmethod

ComputeFullCompactness(particleSystem: shapeworks_py.ParticleSystem, progress_callback: Callable[[float], None] = None) -> numpy.ndarray[numpy.float64[m, 1]]

Computes the compactness measure for a particle system, all modes

ComputeFullGeneralization() staticmethod

ComputeFullGeneralization(particleSystem: shapeworks_py.ParticleSystem, progress_callback: Callable[[float], None] = None) -> numpy.ndarray[numpy.float64[m, 1]]

Computes the generalization measure for a particle system, all modes

ComputeFullSpecificity() staticmethod

ComputeFullSpecificity(particleSystem: shapeworks_py.ParticleSystem, progress_callback: Callable[[float], None] = None) -> numpy.ndarray[numpy.float64[m, 1]]

Computes the specificity measure for a particle system, all modes

ComputeGeneralization() staticmethod

ComputeGeneralization(particleSystem: shapeworks_py.ParticleSystem, nModes: int, saveTo: str = '') -> float

Computes the generalization measure for a particle system

ComputeSpecificity() staticmethod

ComputeSpecificity(particleSystem: shapeworks_py.ParticleSystem, nModes: int, saveTo: str = '') -> float

Computes the specificity measure for a particle system

Subject()

Bases: pybind11_object

get_constraints_filenames() method descriptor

get_constraints_filenames(self: shapeworks_py.Subject) -> List[str]

Get the constraints filenames (one per domain)

get_display_name() method descriptor

get_display_name(self: shapeworks_py.Subject) -> str

Get the display name

get_extra_values() method descriptor

get_extra_values(self: shapeworks_py.Subject) -> Dict[str, str]

Get extra values (extra columns we don't interpret)

get_feature_filenames() method descriptor

get_feature_filenames(self: shapeworks_py.Subject) -> Dict[str, str]

Get the feature map filenames

get_groomed_clipped_mesh() method descriptor

get_groomed_clipped_mesh(self: shapeworks_py.Subject, domain_id: int = 0) -> shapeworks_py.Mesh

Get the mesh clipped by constraints

get_groomed_filenames() method descriptor

get_groomed_filenames(self: shapeworks_py.Subject) -> List[str]

Get groomed filenames

get_groomed_transforms() method descriptor

get_groomed_transforms(self: shapeworks_py.Subject) -> List[List[float]]

Get the groomed transforms (one vector per domain)

get_group_value() method descriptor

get_group_value(self: shapeworks_py.Subject, group_name: str) -> str

Get a specific group value

get_group_values() method descriptor

get_group_values(self: shapeworks_py.Subject) -> tsl::ordered_map, std::__1::allocator\>, std::__1::basic_string\, std::__1::allocator\>, std::__1::hash\, std::__1::allocator\>>, std::__1::equal_to\, std::__1::allocator\>>, std::__1::allocator\, std::__1::allocator\>, std::__1::basic_string\, std::__1::allocator\>>>, std::__1::deque\, std::__1::allocator\>, std::__1::basic_string\, std::__1::allocator\>>, std::__1::allocator\, std::__1::allocator\>, std::__1::basic_string\, std::__1::allocator\>>>>, unsigned int>

Get the group values map

get_landmarks_filenames() method descriptor

get_landmarks_filenames(self: shapeworks_py.Subject) -> List[str]

Get the landmarks filenames (one per domain)

get_local_particle_filenames() method descriptor

get_local_particle_filenames(self: shapeworks_py.Subject) -> List[str]

Get local particle filenames

get_number_of_domains() method descriptor

get_number_of_domains(self: shapeworks_py.Subject) -> int

Get the number of domains

get_original_filenames() method descriptor

get_original_filenames(self: shapeworks_py.Subject) -> List[str]

Get original filenames

get_procrustes_transforms() method descriptor

get_procrustes_transforms(self: shapeworks_py.Subject) -> List[List[float]]

Get the procrustes transforms (one vector per domain)

get_world_particle_filenames() method descriptor

get_world_particle_filenames(self: shapeworks_py.Subject) -> List[str]

Get the world particle filenames

set_constraints_filenames() method descriptor

set_constraints_filenames(self: shapeworks_py.Subject, filenames: List[str]) -> None

Set the constraint filenames (one per domain)

set_display_name() method descriptor

set_display_name(self: shapeworks_py.Subject, display_name: str) -> None

Set the display name

set_excluded() method descriptor

set_excluded(self: shapeworks_py.Subject, excluded: bool) -> None

Set excluded

set_extra_values() method descriptor

set_extra_values(self: shapeworks_py.Subject, extra_values: Dict[str, str]) -> None

Set extra values

set_feature_filenames() method descriptor

set_feature_filenames(self: shapeworks_py.Subject, filenames: Dict[str, str]) -> None

Set the feature map filenames

set_fixed() method descriptor

set_fixed(self: shapeworks_py.Subject, fixed: bool) -> None

Set fixed

set_groomed_filenames() method descriptor

set_groomed_filenames(self: shapeworks_py.Subject, filenames: List[str]) -> None

Set groomed filenames

set_groomed_transforms() method descriptor

set_groomed_transforms(self: shapeworks_py.Subject, transforms: List[List[float]]) -> None

Set the groomed transforms (one vector per domain)

set_group_values() method descriptor

set_group_values(self: shapeworks_py.Subject, Set group values mapgroup_values: Dict[str, str]) -> None

set_landmarks_filenames() method descriptor

set_landmarks_filenames(self: shapeworks_py.Subject, filenames: List[str]) -> None

Set the landmarks filenames (one per domain)

set_local_particle_filenames() method descriptor

set_local_particle_filenames(self: shapeworks_py.Subject, filenames: List[str]) -> None

Set local particle filenames (one per domain)

set_number_of_domains() method descriptor

set_number_of_domains(self: shapeworks_py.Subject, number_of_domains: int) -> None

Set the number of domains

set_original_filenames() method descriptor

set_original_filenames(self: shapeworks_py.Subject, filenames: List[str]) -> None

Set original filenames (one per domain)

set_procrustes_transforms() method descriptor

set_procrustes_transforms(self: shapeworks_py.Subject, transforms: List[List[float]]) -> None

Set the procrustes transforms (one vector per domain)

set_world_particle_filenames() method descriptor

set_world_particle_filenames(self: shapeworks_py.Subject, filenames: List[str]) -> None

Set the world particle filenames

Variant()

Bases: pybind11_object

  1. init(self: shapeworks_py.Variant) -> None

  2. init(self: shapeworks_py.Variant, arg0: List[int]) -> None

  3. init(self: shapeworks_py.Variant, arg0: List[float]) -> None

  4. init(self: shapeworks_py.Variant, arg0: List[bool]) -> None

  5. init(self: shapeworks_py.Variant, arg0: str) -> None

  6. init(self: shapeworks_py.Variant, arg0: int) -> None

  7. init(self: shapeworks_py.Variant, arg0: float) -> None

  8. init(self: shapeworks_py.Variant, arg0: str) -> None

  9. init(self: shapeworks_py.Variant, arg0: bool) -> None

as_str() method descriptor

as_str(self: shapeworks_py.Variant) -> str

Return the variant string content

VectorImage()

Bases: pybind11_object

create a vector image from an image (usually a distance transform) that can be sampled at any point in space

evaluate() method descriptor

evaluate(self: shapeworks_py.VectorImage, pt: List[float]) -> List[float]

evaluate the vector image at any given point in space

WarpTransform(args, kwargs)

Bases: pybind11_object

axis_is_valid() builtin

axis_is_valid(axis: List[float]) -> bool

ensure an axis is valid

degToRad() builtin

degToRad(deg: float) -> float

convert degrees to radians

mean() builtin

mean(arg0: numpy.ndarray) -> float

incrementally compute (single-component) mean of field

range() builtin

range(arg0: numpy.ndarray) -> List[float]

compute (single-component) range of field

seed() builtin

seed(seed: int = 1713107641017977) -> None

sets the seed for random number generation (internal use)

set_progress_callback() builtin

set_progress_callback(callback: capsule) -> None

sets up a progress callback

setup_console_logging() builtin

setup_console_logging(show_progress: bool = True, xml_status: bool = False) -> None

sets up console logging options

stddev() builtin

stddev(arg0: numpy.ndarray) -> float

compute (single-component) standard deviation of field

toAxis() builtin

toAxis(str: str) -> shapeworks_py.Axis

convert to axis