attach vtk context to gcompose
This commit is contained in:
@@ -34,7 +34,8 @@ set(SOURCES VoxRaytracer.cpp
|
||||
QuadMesh.cpp
|
||||
Dense.cpp
|
||||
Structured2DGrid.cpp
|
||||
Structured4DGrid.cpp)
|
||||
Structured4DGrid.cpp
|
||||
MathRegistrations.cpp)
|
||||
|
||||
set(LIBRARIES ${PACKAGE_LIBPREFIX}Core
|
||||
Eigen3::Eigen
|
||||
|
||||
@@ -48,6 +48,9 @@ class ContainerBox : public AffineTransform, public Object {
|
||||
typedef AffineTransform BaseClass;
|
||||
|
||||
public:
|
||||
|
||||
virtual const char * GetClassName() const { return "ContainerBox"; }
|
||||
|
||||
/**
|
||||
* @brief Default constructor.
|
||||
* Initializes the local transformation with this instance as its parent.
|
||||
|
||||
@@ -45,6 +45,9 @@ class Cylinder : public AffineTransform, public Object {
|
||||
typedef AffineTransform BaseClass;
|
||||
|
||||
public:
|
||||
|
||||
virtual const char * GetClassName() const { return "Cylinder"; }
|
||||
|
||||
/**
|
||||
* @brief Default constructor.
|
||||
* Initializes with radius 1 and height 1.
|
||||
|
||||
@@ -28,15 +28,18 @@
|
||||
#ifndef U_GEOMETRY_H
|
||||
#define U_GEOMETRY_H
|
||||
|
||||
#include "Core/Object.h"
|
||||
#include "Math/Dense.h"
|
||||
#include "Math/Transform.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace uLib {
|
||||
|
||||
class Geometry : public AffineTransform {
|
||||
class Geometry : public AffineTransform, public Object {
|
||||
public:
|
||||
|
||||
virtual const char * GetClassName() const { return "Geometry"; }
|
||||
|
||||
virtual Vector3f ToLinear(const Vector3f& curved_space) const {
|
||||
return curved_space;
|
||||
}
|
||||
@@ -87,6 +90,8 @@ class SphericalGeometry : public Geometry {
|
||||
public:
|
||||
SphericalGeometry() {}
|
||||
|
||||
virtual const char * GetClassName() const { return "SphericalGeometry"; }
|
||||
|
||||
Vector3f ToLinear(const Vector3f& spherical) const {
|
||||
float r = spherical.x();
|
||||
float theta = spherical.y();
|
||||
@@ -109,6 +114,8 @@ class ToroidalGeometry : public Geometry {
|
||||
public:
|
||||
ToroidalGeometry(float Rtor) : m_Rtor(Rtor) {}
|
||||
|
||||
virtual const char * GetClassName() const { return "ToroidalGeometry"; }
|
||||
|
||||
Vector3f ToLinear(const Vector3f& toroidal) const {
|
||||
float r = toroidal.x();
|
||||
float theta = toroidal.y();
|
||||
|
||||
20
src/Math/MathRegistrations.cpp
Normal file
20
src/Math/MathRegistrations.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "Core/ObjectFactory.h"
|
||||
#include "Math/ContainerBox.h"
|
||||
#include "Math/Cylinder.h"
|
||||
#include "Math/Geometry.h"
|
||||
#include "Math/TriangleMesh.h"
|
||||
#include "Math/QuadMesh.h"
|
||||
#include "Math/VoxImage.h"
|
||||
#include "Math/StructuredData.h"
|
||||
|
||||
namespace uLib {
|
||||
|
||||
ULIB_REGISTER_OBJECT(ContainerBox)
|
||||
ULIB_REGISTER_OBJECT(Cylinder)
|
||||
ULIB_REGISTER_OBJECT(CylindricalGeometry)
|
||||
ULIB_REGISTER_OBJECT(SphericalGeometry)
|
||||
ULIB_REGISTER_OBJECT(TriangleMesh)
|
||||
ULIB_REGISTER_OBJECT(QuadMesh)
|
||||
ULIB_REGISTER_OBJECT_NAME(VoxImage<Voxel>, "VoxImage")
|
||||
|
||||
} // namespace uLib
|
||||
@@ -36,6 +36,8 @@ class Polydata : public Object {
|
||||
|
||||
public:
|
||||
|
||||
virtual const char * GetClassName() const { return "Polydata"; }
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -37,6 +37,9 @@ namespace uLib {
|
||||
class QuadMesh : public AffineTransform, public Object
|
||||
{
|
||||
public:
|
||||
|
||||
virtual const char * GetClassName() const { return "QuadMesh"; }
|
||||
|
||||
void PrintSelf(std::ostream &o);
|
||||
|
||||
/** @brief Adds a point in global coordinates. Stored in local coordinates. */
|
||||
|
||||
@@ -40,6 +40,9 @@ namespace uLib {
|
||||
class TriangleMesh : public AffineTransform, public Object
|
||||
{
|
||||
public:
|
||||
|
||||
virtual const char * GetClassName() const { return "TriangleMesh"; }
|
||||
|
||||
void PrintSelf(std::ostream &o);
|
||||
|
||||
/** @brief Adds a point in global coordinates. Stored in local coordinates. */
|
||||
|
||||
@@ -46,6 +46,9 @@ namespace Abstract {
|
||||
|
||||
class VoxImage : public uLib::StructuredGrid {
|
||||
public:
|
||||
|
||||
virtual const char * GetClassName() const { return "VoxImage"; }
|
||||
|
||||
typedef uLib::StructuredGrid BaseClass;
|
||||
|
||||
virtual float GetValue(const Vector3i &id) const = 0;
|
||||
|
||||
@@ -57,9 +57,12 @@ protected:
|
||||
} // namespace Abstract
|
||||
|
||||
template <typename VoxelT, typename AlgorithmT>
|
||||
class VoxImageFilter : public Abstract::VoxImageFilter {
|
||||
class VoxImageFilter : public Abstract::VoxImageFilter, public Object {
|
||||
|
||||
public:
|
||||
|
||||
virtual const char * GetClassName() const { return "VoxImageFilter"; }
|
||||
|
||||
VoxImageFilter(const Vector3i &size);
|
||||
|
||||
void Run();
|
||||
|
||||
Reference in New Issue
Block a user