shapeworks
Classes
Types
Name | |
---|---|
enum | Axis { invalid = -1, X, Y, Z} handy way to specify an axis |
enum class char | ConstraintType |
enum class int | CorrespondenceMode |
enum class char | DomainType |
enum | ArrayTransferOptions { COPY_ARRAY, SHARE_ARRAY, MOVE_ARRAY} ways of tranferring Arrays to Python, copy being the least efficient but most conservative |
enum | LandmarkColumns |
enum | LandmarkVisibility |
enum | LandmarkColumns |
enum | LandmarkVisibility |
enum | DisplayMode |
enum class | MessageType |
using itk::Index< 3 > | Coord Simple names for common types used in the framework. |
using itk::Size< 3 > | Dims |
using itk::Point< double, 3 > | Point3 |
using itk::Vector< double, 3 > | Vector3 |
using itk::Matrix< double, 4, 4 > | Matrix44 |
using itk::Matrix< double, 3, 3 > | Matrix33 |
using itk::Point< int, 3 > | IPoint3 |
using itk::Point< float, 3 > | FPoint3 |
using itk::CovariantVector< float, 3 > | Covariant |
using Vector3 | Vector |
using Point3 | Point |
using Matrix33 | Matrix |
using vtkSmartPointer< vtkPlane > | Plane |
using vtkSmartPointer< vtkDataArray > | Array |
using Array | Field |
using std::vector< Point3 > | PointArray |
using itk::Transform< double, 3 > | GenericTransform All transforms can be accessed using a generic transform pointer. |
using itk::IdentityTransform< double, 3 > | IdentityTransform |
using GenericTransform::Pointer | TransformPtr |
using itk::AffineTransform< double, 3 > | AffineTransform Affine transforms are used for many Image manipulation commands. |
using AffineTransform::Pointer | AffineTransformPtr |
using vtkSmartPointer< vtkTransform > | MeshTransform Mesh transforms. |
using itk::ThinPlateSplineKernelTransform2< double, 3 > | ThinPlateSplineTransform Transforms that can be used for ReconstructSurface. |
using itk::CompactlySupportedRBFSparseKernelTransform< double, 3 > | RBFSSparseTransform |
using std::shared_ptr< Project > | ProjectHandle |
template <typename T > using Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > |
VnlMatrix |
using std::map< MeshWorkItem, MeshHandle > | CacheMap |
using std::list< MeshWorkItem > | CacheList |
typedef QSharedPointer< Session > | SessionHandle |
using vtkSmartPointer< vtkTransform > | TransformType TODO: replace this. |
using QSharedPointer< Shape > | ShapeHandle |
using QVector< ShapeHandle > | ShapeList |
using std::shared_ptr< StudioMesh > | MeshHandle |
using std::vector< MeshHandle > | MeshList |
typedef QSharedPointer< Lightbox > | LightboxHandle |
typedef QSharedPointer< Viewer > | ViewerHandle |
typedef QVector< ViewerHandle > | ViewerList |
typedef QSharedPointer< Visualizer > | VisualizerHandle |
Functions
Name | |
---|---|
COMMAND_DECLARE(ReadImage , ImageCommand ) | |
COMMAND_DECLARE(WriteImage , ImageCommand ) | |
COMMAND_DECLARE(ImageInfo , ImageCommand ) | |
COMMAND_DECLARE(Antialias , ImageCommand ) | |
COMMAND_DECLARE(ResampleImage , ImageCommand ) | |
COMMAND_DECLARE(ResizeImage , ImageCommand ) | |
COMMAND_DECLARE(RecenterImage , ImageCommand ) | |
COMMAND_DECLARE(PadImage , ImageCommand ) | |
COMMAND_DECLARE(TranslateImage , ImageCommand ) | |
COMMAND_DECLARE(ScaleImage , ImageCommand ) | |
COMMAND_DECLARE(Rotate , ImageCommand ) | |
COMMAND_DECLARE(ExtractLabel , ImageCommand ) | |
COMMAND_DECLARE(CloseHoles , ImageCommand ) | |
COMMAND_DECLARE(Binarize , ImageCommand ) | |
COMMAND_DECLARE(ComputeDT , ImageCommand ) | |
COMMAND_DECLARE(CurvatureFilter , ImageCommand ) | |
COMMAND_DECLARE(GradientFilter , ImageCommand ) | |
COMMAND_DECLARE(SigmoidFilter , ImageCommand ) | |
COMMAND_DECLARE(TPLevelSetFilter , ImageCommand ) | |
COMMAND_DECLARE(TopologyPreservingFilter , ImageCommand ) | |
COMMAND_DECLARE(IntensityFilter , ImageCommand ) | |
COMMAND_DECLARE(Blur , ImageCommand ) | |
COMMAND_DECLARE(BoundingBoxImage , ImageCommand ) | |
COMMAND_DECLARE(ImageBounds , ImageCommand ) | |
COMMAND_DECLARE(CropImage , ImageCommand ) | |
COMMAND_DECLARE(ICPRigid , ImageCommand ) | |
COMMAND_DECLARE(ClipImage , ImageCommand ) | |
COMMAND_DECLARE(ReflectImage , ImageCommand ) | |
COMMAND_DECLARE(SetOrigin , ImageCommand ) | |
COMMAND_DECLARE(SetSpacing , ImageCommand ) | |
COMMAND_DECLARE(WarpImage , ImageCommand ) | |
COMMAND_DECLARE(CompareImage , ImageCommand ) | |
COMMAND_DECLARE(NegateImage , ImageCommand ) | |
COMMAND_DECLARE(AddImage , ImageCommand ) | |
COMMAND_DECLARE(SubtractImage , ImageCommand ) | |
COMMAND_DECLARE(MultiplyImage , ImageCommand ) | |
COMMAND_DECLARE(DivideImage , ImageCommand ) | |
COMMAND_DECLARE(ImageToMesh , ImageCommand ) | |
COMMAND_DECLARE(SetRegion , ImageCommand ) | |
COMMAND_DECLARE(Isolate , ImageCommand ) | |
COMMAND_DECLARE(ReadParticleSystem , ParticleSystemCommand ) | |
COMMAND_DECLARE(Compactness , ParticleSystemCommand ) | |
COMMAND_DECLARE(Generalization , ParticleSystemCommand ) | |
COMMAND_DECLARE(Specificity , ParticleSystemCommand ) | |
COMMAND_DECLARE(ReadMesh , MeshCommand ) | |
COMMAND_DECLARE(WriteMesh , MeshCommand ) | |
COMMAND_DECLARE(MeshInfo , MeshCommand ) | |
COMMAND_DECLARE(Coverage , MeshCommand ) | |
COMMAND_DECLARE(Smooth , MeshCommand ) | |
COMMAND_DECLARE(SmoothSinc , MeshCommand ) | |
COMMAND_DECLARE(Remesh , MeshCommand ) | |
COMMAND_DECLARE(RemeshPercent , MeshCommand ) | |
COMMAND_DECLARE(InvertNormals , MeshCommand ) | |
COMMAND_DECLARE(ReflectMesh , MeshCommand ) | |
COMMAND_DECLARE(TransformMesh , MeshCommand ) | |
COMMAND_DECLARE(FillHoles , MeshCommand ) | |
COMMAND_DECLARE(ProbeVolume , MeshCommand ) | |
COMMAND_DECLARE(ClipMesh , MeshCommand ) | |
COMMAND_DECLARE(TranslateMesh , MeshCommand ) | |
COMMAND_DECLARE(ScaleMesh , MeshCommand ) | |
COMMAND_DECLARE(BoundingBoxMesh , MeshCommand ) | |
COMMAND_DECLARE(MeshBounds , MeshCommand ) | |
COMMAND_DECLARE(Distance , MeshCommand ) | |
COMMAND_DECLARE(ComputeNormals , MeshCommand ) | |
COMMAND_DECLARE(SetField , MeshCommand ) | |
COMMAND_DECLARE(GetField , MeshCommand ) | |
COMMAND_DECLARE(SetFieldValue , MeshCommand ) | |
COMMAND_DECLARE(GetFieldValue , MeshCommand ) | |
COMMAND_DECLARE(FieldRange , MeshCommand ) | |
COMMAND_DECLARE(FieldMean , MeshCommand ) | |
COMMAND_DECLARE(FieldStd , MeshCommand ) | |
COMMAND_DECLARE(FieldNames , MeshCommand ) | |
COMMAND_DECLARE(FixElement , MeshCommand ) | |
COMMAND_DECLARE(ClipClosedSurface , MeshCommand ) | |
COMMAND_DECLARE(ClosestPoint , MeshCommand ) | |
COMMAND_DECLARE(GeodesicDistance , MeshCommand ) | |
COMMAND_DECLARE(GeodesicDistanceToLandmark , MeshCommand ) | |
COMMAND_DECLARE(MeanNormals , MeshCommand ) | |
COMMAND_DECLARE(Curvature , MeshCommand ) | |
COMMAND_DECLARE(MeshToImage , MeshCommand ) | |
COMMAND_DECLARE(MeshToDT , MeshCommand ) | |
COMMAND_DECLARE(CompareMesh , MeshCommand ) | |
COMMAND_DECLARE(WarpMesh , MeshCommand ) | |
COMMAND_DECLARE(Seed , ShapeworksCommand ) | |
COMMAND_DECLARE(OptimizeCommand , OptimizeCommandGroup ) | |
COMMAND_DECLARE(GroomCommand , GroomCommandGroup ) | |
std::ostream & | operator<<(std::ostream & os, const IndexRegion & region) |
std::ostream & | operator<<(std::ostream & os, const PhysicalRegion & region) |
Vector3 | makeVector(std::array< double, 3 > && arr) Enables makeVector({1,2,3}); , construction using an initializer list (likely an accidental omission in current ITK version) |
PointArray | makePointArray(int size, Point3 value) |
TransformPtr | createTransform(const Matrix33 & mat, const Vector3 & translate =makeVector({0, 0, 0})) |
Plane | makePlane(const Point & p, const Vector3 & n) Make a plane. |
Plane | makePlane(const Point & p0, const Point & p1, const Point & p2) |
Point | getOrigin(const Plane plane) Get origin and normal of plane. |
Vector3 | getNormal(const Plane plane) |
MeshTransform | createMeshTransform(const vtkSmartPointer< vtkMatrix4x4 > & mat) |
Point | toPoint(const Dims & d) For deliberate conversions between types. |
Point | toPoint(const Coord & c) |
Vector | toVector(const Dims & d) |
Vector | toVector(const Point & p) |
Vector | toVector(const itk::CovariantVector< double, 3 > & v) |
Point | toPoint(const Vector & v) |
Coord | toCoord(const Dims & d) |
Dims | toDims(const Coord & c) |
Dims | toDims(const Point & p) |
Coord | toCoord(const Point & p) |
template <typename P > P |
negate(const P & p) Negation operator (ITK only has it for Vectors, but sometimes useful for Points) |
Vector3 | negate(const Vector3 & v) Negate function for Vector (requires makeVector) |
template <typename P > P |
invertValue(const P & p) Inversion function for all but Vector. |
Vector3 | invertValue(const Vector3 & v) Inversion function for Vector (requires makeVector) |
Vector3 | dotProduct(const Vector3 & a, const Vector3 & b) Vector dot and cross products. |
Vector3 | crossProduct(const Vector3 & a, const Vector3 & b) |
double | length(const Vector3 & v) |
Axis | toAxis(const std::string & str) |
std::string | axisToString(Axis axis) |
bool | axis_is_valid(const Vector3 & axis) Ensure an axis is valid. |
bool | axis_is_valid(const Axis & axis) |
double | degToRad(const double deg) convert degrees to radians |
double | mean(const Field field) incrementally compute (single-component) mean of field |
double | stddev(const Field field) compute (single-component) standard deviation of field |
std::vector< double > | range(const Field field) compute (single-component) range of field |
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename P ,typename =std::enable_if_t<std::is_same |
|
template <typename T > bool |
epsEqual(T a, T b, T epsilon) |
template <typename P ,typename =std::enable_if_t<std::is_same |
|
bool | epsEqual(double a, double b, double eps) |
template <typename T > T |
clamp(T value, T min, T max) Simple clamp operation until C++17. |
std::ostream & | operator<<(std::ostream & os, const Image & img) stream insertion operators for Image |
Image | operator*(const Image & img, const double x) override templates defined in [Shapeworks.h] |
Image | operator/(const Image & img, const double x) |
Image & | operator*=(Image & img, const double x) |
Image & | operator/=(Image & img, const double x) |
std::ostream & | operator<<(std::ostream & os, const Mesh & mesh) stream insertion operators for Mesh |
void | SaveReconstructions(std::vector< Reconstruction > & reconstructions, const std::vector< std::string > & srcPaths, const std::string & saveTo) |
template <typename T > std::string |
variant_to_string(T begin, T end) |
void | printNumpyArrayInfo(const py::array & np_array) print buffer info for the given array (dims, format, strides, etc) |
void | verifyOrderAndPacking(const py::array & np_array) verify py::array has expected order and is densely packed, throw if not |
void | setOwnership(py::array & array, bool owns) sets the OWNDATA flag of the given array to owns |
Image::ImageType::Pointer | wrapNumpyArr(py::array & np_array) helper function for Image.init and Image.assign |
Array | pyToArr(py::array & np_array, bool take_ownership =true) converts py::array to vtkDataArray, optionally taking ownership of data |
py::array | arrToPy(Array & array, ArrayTransferOptions xfer =COPY_ARRAY) convert a vtkDataArray (AOS assumed) to a py::array using specified means of transfer |
Eigen::MatrixXd | itkTransformToEigen(TransformPtr itk_xform) |
TransformPtr | eigen44ToItkTransform(const Eigen::Matrix< double, 4, 4 > & eigen_mat) |
Eigen::Matrix< double, 4, 4, Eigen::RowMajor > | vtkTransformToEigen(MeshTransform vtk_xform) |
MeshTransform | eigen44ToVtkTransform(const Eigen::Matrix< double, 4, 4, Eigen::RowMajor > & eigen_mat) |
template <typename T ,unsigned NRows,unsigned NCols> Eigen::Matrix< T, NRows, NCols, Eigen::RowMajor > |
itkToEigen(const itk::Matrix< T, NRows, NCols > & itk_mat) Conversion (by copy) of itk matrix to Eigen::Matrix. |
template <typename T ,int NRows,int NCols> itk::Matrix< T, NRows, NCols > |
eigenToItk(const Eigen::Matrix< T, NRows, NCols, Eigen::RowMajor > & eigen_mat) Conversion (by copy) of Eigen::Matrix to itk (i.e., vnl) matrix. |
template <typename T > Eigen::Map< VnlMatrix< T > > |
vnlToEigen(const vnl_matrix< T > & vnl_mat) Wrap vnl matrix data to Eigen Matrix. |
template <int NRows,int NCols,typename T > Eigen::Map< Eigen::Matrix< T, NRows, NCols, Eigen::RowMajor > > |
wrapDataWithEigen(T * data) |
template <typename T > Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > |
wrapDataWithEigen(T * data, size_t nrows, size_t ncols) Wrap a data pointer of the specified size with Eigen::Matrix. |
template <unsigned NRows,unsigned NCols,typename T > itk::Matrix< T, NRows, NCols > |
wrapDataWithItk(T * data) |
std::string | display_mode_to_string(DisplayMode display_mode) |
DisplayMode | string_to_display_mode(std::string str) |
Attributes
Name | |
---|---|
const auto | Pi pi that doesn't depend on deprecated or non-std lib defines |
Types Documentation
enum Axis
Enumerator | Value | Description |
---|---|---|
invalid | -1 | |
X | ||
Y | ||
Z |
handy way to specify an axis
enum ConstraintType
Enumerator | Value | Description |
---|---|---|
Sphere | 'S' | |
CuttingPlane | 'C' | |
FreeForm | 'F' |
enum CorrespondenceMode
Enumerator | Value | Description |
---|---|---|
MeanEnergy | 0 | |
EnsembleEntropy | 1 | |
EnsembleRegressionEntropy | 3 | |
EnsembleMixedEffectsEntropy | 4 | |
MeshBasedGeneralEntropy | 5 | |
MeshBasedGeneralMeanEnergy | 6 |
enum DomainType
Enumerator | Value | Description |
---|---|---|
Image | 'I' | |
Mesh | 'M' | |
Contour | 'C' |
enum ArrayTransferOptions
Enumerator | Value | Description |
---|---|---|
COPY_ARRAY | ||
SHARE_ARRAY | ||
MOVE_ARRAY |
ways of tranferring Arrays to Python, copy being the least efficient but most conservative
enum LandmarkColumns
Enumerator | Value | Description |
---|---|---|
VISIBLE_E | ||
COLOR_E | ||
NAME_E | ||
POSITION_E | ||
SET_BUTTON_E | ||
COMMENT_E | ||
END_E | ||
VISIBLE_E | ||
COLOR_E | ||
NAME_E | ||
POSITION_E | ||
SET_BUTTON_E | ||
COMMENT_E | ||
END_E |
enum LandmarkVisibility
Enumerator | Value | Description |
---|---|---|
ALL_VISIBLE_E | ||
NONE_VISIBLE_E | ||
SOME_VISIBLE_E | ||
ALL_VISIBLE_E | ||
NONE_VISIBLE_E | ||
SOME_VISIBLE_E |
enum LandmarkColumns
Enumerator | Value | Description |
---|---|---|
VISIBLE_E | ||
COLOR_E | ||
NAME_E | ||
POSITION_E | ||
SET_BUTTON_E | ||
COMMENT_E | ||
END_E | ||
VISIBLE_E | ||
COLOR_E | ||
NAME_E | ||
POSITION_E | ||
SET_BUTTON_E | ||
COMMENT_E | ||
END_E |
enum LandmarkVisibility
Enumerator | Value | Description |
---|---|---|
ALL_VISIBLE_E | ||
NONE_VISIBLE_E | ||
SOME_VISIBLE_E | ||
ALL_VISIBLE_E | ||
NONE_VISIBLE_E | ||
SOME_VISIBLE_E |
enum DisplayMode
Enumerator | Value | Description |
---|---|---|
Original | 0 | |
Groomed | 1 | |
Reconstructed | 2 |
enum MessageType
Enumerator | Value | Description |
---|---|---|
normal | ||
warning | ||
error | ||
debug |
using Coord
using shapeworks::Coord = typedef itk::Index<3>;
Simple names for common types used in the framework.
using Dims
using shapeworks::Dims = typedef itk::Size<3>;
using Point3
using shapeworks::Point3 = typedef itk::Point<double, 3>;
using Vector3
using shapeworks::Vector3 = typedef itk::Vector<double, 3>;
using Matrix44
using shapeworks::Matrix44 = typedef itk::Matrix<double, 4, 4>;
using Matrix33
using shapeworks::Matrix33 = typedef itk::Matrix<double, 3, 3>;
using IPoint3
using shapeworks::IPoint3 = typedef itk::Point<int, 3>;
using FPoint3
using shapeworks::FPoint3 = typedef itk::Point<float, 3>;
using Covariant
using shapeworks::Covariant = typedef itk::CovariantVector<float, 3>;
using Vector
using shapeworks::Vector = typedef Vector3;
using Point
using shapeworks::Point = typedef Point3;
using Matrix
using shapeworks::Matrix = typedef Matrix33;
using Plane
using shapeworks::Plane = typedef vtkSmartPointer<vtkPlane>;
using Array
using shapeworks::Array = typedef vtkSmartPointer<vtkDataArray>;
using Field
using shapeworks::Field = typedef Array;
using PointArray
using shapeworks::PointArray = typedef std::vector<Point3>;
using GenericTransform
using shapeworks::GenericTransform = typedef itk::Transform<double, 3>;
All transforms can be accessed using a generic transform pointer.
using IdentityTransform
using shapeworks::IdentityTransform = typedef itk::IdentityTransform<double, 3>;
using TransformPtr
using shapeworks::TransformPtr = typedef GenericTransform::Pointer;
using AffineTransform
using shapeworks::AffineTransform = typedef itk::AffineTransform<double, 3>;
Affine transforms are used for many Image manipulation commands.
using AffineTransformPtr
using shapeworks::AffineTransformPtr = typedef AffineTransform::Pointer;
using MeshTransform
using shapeworks::MeshTransform = typedef vtkSmartPointer<vtkTransform>;
Mesh transforms.
using ThinPlateSplineTransform
using shapeworks::ThinPlateSplineTransform = typedef itk::ThinPlateSplineKernelTransform2<double, 3>;
Transforms that can be used for ReconstructSurface.
using RBFSSparseTransform
using shapeworks::RBFSSparseTransform = typedef itk::CompactlySupportedRBFSparseKernelTransform<double, 3>;
using ProjectHandle
using shapeworks::ProjectHandle = typedef std::shared_ptr<Project>;
using VnlMatrix
template <typename T >
using shapeworks::VnlMatrix = typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
using CacheMap
using shapeworks::CacheMap = typedef std::map<MeshWorkItem, MeshHandle>;
using CacheList
using shapeworks::CacheList = typedef std::list<MeshWorkItem>;
typedef SessionHandle
typedef QSharedPointer<Session> shapeworks::SessionHandle;
using TransformType
using shapeworks::TransformType = typedef vtkSmartPointer<vtkTransform>;
TODO: replace this.
using ShapeHandle
using shapeworks::ShapeHandle = typedef QSharedPointer<Shape>;
using ShapeList
using shapeworks::ShapeList = typedef QVector<ShapeHandle>;
using MeshHandle
using shapeworks::MeshHandle = typedef std::shared_ptr<StudioMesh>;
using MeshList
using shapeworks::MeshList = typedef std::vector<MeshHandle>;
typedef LightboxHandle
typedef QSharedPointer<Lightbox> shapeworks::LightboxHandle;
typedef ViewerHandle
typedef QSharedPointer<Viewer> shapeworks::ViewerHandle;
typedef ViewerList
typedef QVector<ViewerHandle> shapeworks::ViewerList;
typedef VisualizerHandle
typedef QSharedPointer<Visualizer> shapeworks::VisualizerHandle;
Functions Documentation
function COMMAND_DECLARE
COMMAND_DECLARE(
ReadImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
WriteImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ImageInfo ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Antialias ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ResampleImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ResizeImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
RecenterImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
PadImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
TranslateImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ScaleImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Rotate ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ExtractLabel ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
CloseHoles ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Binarize ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ComputeDT ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
CurvatureFilter ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
GradientFilter ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
SigmoidFilter ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
TPLevelSetFilter ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
TopologyPreservingFilter ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
IntensityFilter ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Blur ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
BoundingBoxImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ImageBounds ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
CropImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ICPRigid ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ClipImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ReflectImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
SetOrigin ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
SetSpacing ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
WarpImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
CompareImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
NegateImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
AddImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
SubtractImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
MultiplyImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
DivideImage ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ImageToMesh ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
SetRegion ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Isolate ,
ImageCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ReadParticleSystem ,
ParticleSystemCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Compactness ,
ParticleSystemCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Generalization ,
ParticleSystemCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Specificity ,
ParticleSystemCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ReadMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
WriteMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
MeshInfo ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Coverage ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Smooth ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
SmoothSinc ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Remesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
RemeshPercent ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
InvertNormals ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ReflectMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
TransformMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
FillHoles ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ProbeVolume ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ClipMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
TranslateMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ScaleMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
BoundingBoxMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
MeshBounds ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Distance ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ComputeNormals ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
SetField ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
GetField ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
SetFieldValue ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
GetFieldValue ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
FieldRange ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
FieldMean ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
FieldStd ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
FieldNames ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
FixElement ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ClipClosedSurface ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
ClosestPoint ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
GeodesicDistance ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
GeodesicDistanceToLandmark ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
MeanNormals ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Curvature ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
MeshToImage ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
MeshToDT ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
CompareMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
WarpMesh ,
MeshCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
Seed ,
ShapeworksCommand
)
function COMMAND_DECLARE
COMMAND_DECLARE(
OptimizeCommand ,
OptimizeCommandGroup
)
function COMMAND_DECLARE
COMMAND_DECLARE(
GroomCommand ,
GroomCommandGroup
)
function operator<<
std::ostream & operator<<(
std::ostream & os,
const IndexRegion & region
)
function operator<<
std::ostream & operator<<(
std::ostream & os,
const PhysicalRegion & region
)
function makeVector
Vector3 makeVector(
std::array< double, 3 > && arr
)
Enables makeVector({1,2,3});
, construction using an initializer list (likely an accidental omission in current ITK version)
function makePointArray
PointArray makePointArray(
int size,
Point3 value
)
function createTransform
TransformPtr createTransform(
const Matrix33 & mat,
const Vector3 & translate =makeVector({0, 0, 0})
)
function makePlane
Plane makePlane(
const Point & p,
const Vector3 & n
)
Make a plane.
function makePlane
Plane makePlane(
const Point & p0,
const Point & p1,
const Point & p2
)
function getOrigin
Point getOrigin(
const Plane plane
)
Get origin and normal of plane.
function getNormal
Vector3 getNormal(
const Plane plane
)
function createMeshTransform
MeshTransform createMeshTransform(
const vtkSmartPointer< vtkMatrix4x4 > & mat
)
function toPoint
Point toPoint(
const Dims & d
)
For deliberate conversions between types.
function toPoint
Point toPoint(
const Coord & c
)
function toVector
Vector toVector(
const Dims & d
)
function toVector
Vector toVector(
const Point & p
)
function toVector
Vector toVector(
const itk::CovariantVector< double, 3 > & v
)
function toPoint
Point toPoint(
const Vector & v
)
function toCoord
Coord toCoord(
const Dims & d
)
function toDims
Dims toDims(
const Coord & c
)
function toDims
Dims toDims(
const Point & p
)
function toCoord
Coord toCoord(
const Point & p
)
function negate
template <typename P >
P negate(
const P & p
)
Negation operator (ITK only has it for Vectors, but sometimes useful for Points)
function negate
Vector3 negate(
const Vector3 & v
)
Negate function for Vector (requires makeVector)
function invertValue
template <typename P >
P invertValue(
const P & p
)
Inversion function for all but Vector.
function invertValue
Vector3 invertValue(
const Vector3 & v
)
Inversion function for Vector (requires makeVector)
function dotProduct
Vector3 dotProduct(
const Vector3 & a,
const Vector3 & b
)
Vector dot and cross products.
function crossProduct
Vector3 crossProduct(
const Vector3 & a,
const Vector3 & b
)
function length
double length(
const Vector3 & v
)
function toAxis
Axis toAxis(
const std::string & str
)
function axisToString
std::string axisToString(
Axis axis
)
function axis_is_valid
bool axis_is_valid(
const Vector3 & axis
)
Ensure an axis is valid.
function axis_is_valid
bool axis_is_valid(
const Axis & axis
)
function degToRad
double degToRad(
const double deg
)
convert degrees to radians
function mean
double mean(
const Field field
)
incrementally compute (single-component) mean of field
function stddev
double stddev(
const Field field
)
compute (single-component) standard deviation of field
function range
std::vector< double > range(
const Field field
)
compute (single-component) range of field
function operator+
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P operator+(
const P & p,
const P & q
)
function operator-
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P operator-(
const P & p,
const P & q
)
function operator*
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Vector, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P operator*(
const P & p,
const P & q
)
function operator/
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Vector, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P operator/(
const P & p,
const P & q
)
function operator+=
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P & operator+=(
P & p,
const P & q
)
function operator-=
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P & operator-=(
P & p,
const P & q
)
function operator*
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P operator*(
const P & p,
const double x
)
function operator/
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P operator/(
const P & p,
const double x
)
function operator*=
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P & operator*=(
P & p,
const double x
)
function operator/=
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
P & operator/=(
P & p,
const double x
)
function epsEqual
template <typename T >
bool epsEqual(
T a,
T b,
T epsilon
)
function epsEqual
template <typename P ,
typename =std::enable_if_t<std::is_same<Image, P>::value || std::is_same<Coord, P>::value || std::is_same<Dims, P>::value || std::is_same<Vector, P>::value || std::is_same<Point, P>::value || std::is_same<IPoint3, P>::value || std::is_same<FPoint3, P>::value>>
bool epsEqual(
const P & a,
const P & b,
const typename P::ValueType & eps
)
function epsEqual
bool epsEqual(
double a,
double b,
double eps
)
function clamp
template <typename T >
T clamp(
T value,
T min,
T max
)
Simple clamp operation until C++17.
function operator<<
std::ostream & operator<<(
std::ostream & os,
const Image & img
)
stream insertion operators for Image
function operator*
Image operator*(
const Image & img,
const double x
)
override templates defined in [Shapeworks.h]
function operator/
Image operator/(
const Image & img,
const double x
)
function operator*=
Image & operator*=(
Image & img,
const double x
)
function operator/=
Image & operator/=(
Image & img,
const double x
)
function operator<<
std::ostream & operator<<(
std::ostream & os,
const Mesh & mesh
)
stream insertion operators for Mesh
function SaveReconstructions
void SaveReconstructions(
std::vector< Reconstruction > & reconstructions,
const std::vector< std::string > & srcPaths,
const std::string & saveTo
)
function variant_to_string
template <typename T >
std::string variant_to_string(
T begin,
T end
)
function printNumpyArrayInfo
void printNumpyArrayInfo(
const py::array & np_array
)
print buffer info for the given array (dims, format, strides, etc)
function verifyOrderAndPacking
void verifyOrderAndPacking(
const py::array & np_array
)
verify py::array has expected order and is densely packed, throw if not
function setOwnership
void setOwnership(
py::array & array,
bool owns
)
sets the OWNDATA flag of the given array to owns
function wrapNumpyArr
Image::ImageType::Pointer wrapNumpyArr(
py::array & np_array
)
helper function for Image.init and Image.assign
function pyToArr
Array pyToArr(
py::array & np_array,
bool take_ownership =true
)
converts py::array to vtkDataArray, optionally taking ownership of data
function arrToPy
py::array arrToPy(
Array & array,
ArrayTransferOptions xfer =COPY_ARRAY
)
convert a vtkDataArray (AOS assumed) to a py::array using specified means of transfer
function itkTransformToEigen
Eigen::MatrixXd itkTransformToEigen(
TransformPtr itk_xform
)
function eigen44ToItkTransform
TransformPtr eigen44ToItkTransform(
const Eigen::Matrix< double, 4, 4 > & eigen_mat
)
function vtkTransformToEigen
Eigen::Matrix< double, 4, 4, Eigen::RowMajor > vtkTransformToEigen(
MeshTransform vtk_xform
)
function eigen44ToVtkTransform
MeshTransform eigen44ToVtkTransform(
const Eigen::Matrix< double, 4, 4, Eigen::RowMajor > & eigen_mat
)
function itkToEigen
template <typename T ,
unsigned NRows,
unsigned NCols>
Eigen::Matrix< T, NRows, NCols, Eigen::RowMajor > itkToEigen(
const itk::Matrix< T, NRows, NCols > & itk_mat
)
Conversion (by copy) of itk matrix to Eigen::Matrix.
function eigenToItk
template <typename T ,
int NRows,
int NCols>
itk::Matrix< T, NRows, NCols > eigenToItk(
const Eigen::Matrix< T, NRows, NCols, Eigen::RowMajor > & eigen_mat
)
Conversion (by copy) of Eigen::Matrix to itk (i.e., vnl) matrix.
function vnlToEigen
template <typename T >
Eigen::Map< VnlMatrix< T > > vnlToEigen(
const vnl_matrix< T > & vnl_mat
)
Wrap vnl matrix data to Eigen Matrix.
function wrapDataWithEigen
template <int NRows,
int NCols,
typename T >
Eigen::Map< Eigen::Matrix< T, NRows, NCols, Eigen::RowMajor > > wrapDataWithEigen(
T * data
)
Wrap data pointer with Eigen::Matrix. Handy for efficiently going back and forth between Python numpy arrays. WARNING: if data goes out of scope (e.g., numpy array size changes), matrix will point to invalid location.
function wrapDataWithEigen
template <typename T >
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > wrapDataWithEigen(
T * data,
size_t nrows,
size_t ncols
)
Wrap a data pointer of the specified size with Eigen::Matrix.
function wrapDataWithItk
template <unsigned NRows,
unsigned NCols,
typename T >
itk::Matrix< T, NRows, NCols > wrapDataWithItk(
T * data
)
Wrap data pointer with itk::Matrix. Handy for efficiently going back and forth between Python numpy arrays. WARNING: This function actually just copies data.
function display_mode_to_string
std::string display_mode_to_string(
DisplayMode display_mode
)
function string_to_display_mode
DisplayMode string_to_display_mode(
std::string str
)
Attributes Documentation
variable Pi
const auto Pi = std::atan(1.0) * 4.0;
pi that doesn't depend on deprecated or non-std lib defines
Updated on 2022-07-23 at 16:40:06 -0600