aimsdata 6.0.0
Neuroimaging data handling
aims::SurfaceGenerator Class Reference

Factory class for various common shapes of meshes. More...

#include <aims/mesh/surfacegen.h>

Classes

struct  Generator
 
struct  Generator_wireframe
 

Public Types

typedef AimsSurfaceTriangle *(* GenFunction) (const carto::GenericObject &)
 
typedef AimsTimeSurface< 2, Void > *(* GenFunction_wireframe) (const carto::GenericObject &)
 

Static Public Member Functions

static AimsSurfaceTrianglegenerate (const carto::GenericObject &params)
 generic factory function (calls lower-level functions)
 
static AimsSurfaceTrianglegenerate (carto::Object params)
 generic factory function (calls lower-level functions)
 
static AimsTimeSurface< 2, Void > * generate_wireframe (const carto::GenericObject &params)
 
static AimsTimeSurface< 2, Void > * generate_wireframe (carto::Object params)
 generic factory function (calls lower-level functions)
 
static carto::Object description ()
 description of known shapes and parameters (vector of dicts)
 
static carto::Object description_wireframe ()
 
static void printDescription (std::ostream &s=std::cout)
 outputs the description() dictionary in a more huma-readable way
 
static void printDescription_wireframe (std::ostream &s=std::cout)
 
static AimsSurfaceTrianglecube (const carto::GenericObject &params)
 
static AimsSurfaceTrianglecube (const Point3df &center, float radius, bool smoothnormal=false)
 
static AimsSurfaceTrianglecylinder (const carto::GenericObject &params)
 
static AimsSurfaceTrianglecylinder (const Point3df &p1, const Point3df &p2, float radius, float radius2, unsigned nfacets, bool closed, bool smooth=false, bool smoooth_tube=true)
 
static AimsSurfaceTrianglecone (const carto::GenericObject &params)
 
static AimsSurfaceTrianglecone (const Point3df &arrow, const Point3df &base, float radius, unsigned nfacets, bool closed, bool smooth=false)
 
static AimsSurfaceTrianglearrow (const carto::GenericObject &params)
 
static AimsSurfaceTrianglearrow (const Point3df &arrow, const Point3df &base, float radius, float arrowradius, unsigned nfacets, float arrowlengthfract)
 
static AimsSurfaceTriangleicosahedron (const carto::GenericObject &params)
 Sphere generation functions by Manik Bhattacharjee (CNRS UPR640 - LENA)
 
static AimsSurfaceTriangleicosahedron (const Point3df &center, float radius)
 
static AimsSurfaceTrianglesphere (const carto::GenericObject &params)
 
static AimsSurfaceTrianglesphere (const Point3df &p1, float radius, unsigned nfacets, bool uniquevertices=false)
 
static AimsSurfaceTriangleellipse (const carto::GenericObject &params)
 
static AimsSurfaceTriangleellipse (const Point3df &p1, float radius1, float radius2, unsigned nfacets, bool uniquevertices=false)
 
static AimsSurfaceTriangleicosphere (const carto::GenericObject &params)
 
static AimsSurfaceTriangleicosphere (const Point3df &center, float radius, unsigned nfacets)
 
static AimsTimeSurface< 2, Void > * parallelepiped_wireframe (const carto::GenericObject &params)
 
static AimsTimeSurface< 2, Void > * parallelepiped_wireframe (const Point3df &boundingbox_min, const Point3df &boundingbox_max)
 
static AimsSurfaceTriangleparallelepiped (const carto::GenericObject &params)
 
static AimsSurfaceTriangleparallelepiped (const Point3df &boundingbox_min, const Point3df &boundingbox_max, bool smooth=false)
 
static AimsTimeSurface< 2, Void > * circle_wireframe (const carto::GenericObject &params)
 
static AimsTimeSurface< 2, Void > * circle_wireframe (const Point3df &center, float radius, unsigned nseg=20, const Point3df &normal=Point3df(0, 0, 1), const Point3df &startdir=Point3df(1, 0, 0), float startangle=0, float stopangle=M_PI *2)
 Circle, or part of circle.
 
static AimsTimeSurface< 2, Void > * grid (const carto::GenericObject &params)
 
static AimsTimeSurface< 2, Void > * grid (const Point3df &boundingbox_min, const Point3df &boundingbox_max, const Point3df &grid_sampling)
 Grid wireframe.
 

Detailed Description

Factory class for various common shapes of meshes.

Definition at line 45 of file surfacegen.h.

Member Typedef Documentation

◆ GenFunction

typedef AimsSurfaceTriangle *(* aims::SurfaceGenerator::GenFunction) (const carto::GenericObject &)

Definition at line 48 of file surfacegen.h.

◆ GenFunction_wireframe

typedef AimsTimeSurface< 2, Void > *(* aims::SurfaceGenerator::GenFunction_wireframe) (const carto::GenericObject &)

Definition at line 50 of file surfacegen.h.

Member Function Documentation

◆ arrow() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::arrow ( const carto::GenericObject & params)
static

Referenced by arrow(), and cone().

◆ arrow() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::arrow ( const Point3df & arrow,
const Point3df & base,
float radius,
float arrowradius,
unsigned nfacets,
float arrowlengthfract )
static

References arrow().

◆ circle_wireframe() [1/2]

static AimsTimeSurface< 2, Void > * aims::SurfaceGenerator::circle_wireframe ( const carto::GenericObject & params)
static

◆ circle_wireframe() [2/2]

static AimsTimeSurface< 2, Void > * aims::SurfaceGenerator::circle_wireframe ( const Point3df & center,
float radius,
unsigned nseg = 20,
const Point3df & normal = Point3df(0, 0, 1),
const Point3df & startdir = Point3df(1, 0, 0),
float startangle = 0,
float stopangle = M_PI *2 )
static

Circle, or part of circle.

center, radius are classical. nseg is the number of segments in the circle polygon normal is a normal vector to the circle plane. startdir is a vector in the circle plane determining the beginning of angles (circle ray). startangle, stopangle are meant to make parts of circle

◆ cone() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::cone ( const carto::GenericObject & params)
static

◆ cone() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::cone ( const Point3df & arrow,
const Point3df & base,
float radius,
unsigned nfacets,
bool closed,
bool smooth = false )
static

References arrow().

◆ cube() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::cube ( const carto::GenericObject & params)
static

◆ cube() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::cube ( const Point3df & center,
float radius,
bool smoothnormal = false )
static

◆ cylinder() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::cylinder ( const carto::GenericObject & params)
static

◆ cylinder() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::cylinder ( const Point3df & p1,
const Point3df & p2,
float radius,
float radius2,
unsigned nfacets,
bool closed,
bool smooth = false,
bool smoooth_tube = true )
static

◆ description()

static carto::Object aims::SurfaceGenerator::description ( )
static

description of known shapes and parameters (vector of dicts)

◆ description_wireframe()

static carto::Object aims::SurfaceGenerator::description_wireframe ( )
static

◆ ellipse() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::ellipse ( const carto::GenericObject & params)
static

◆ ellipse() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::ellipse ( const Point3df & p1,
float radius1,
float radius2,
unsigned nfacets,
bool uniquevertices = false )
static

◆ generate() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::generate ( carto::Object params)
static

generic factory function (calls lower-level functions)

◆ generate() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::generate ( const carto::GenericObject & params)
static

generic factory function (calls lower-level functions)

◆ generate_wireframe() [1/2]

static AimsTimeSurface< 2, Void > * aims::SurfaceGenerator::generate_wireframe ( carto::Object params)
static

generic factory function (calls lower-level functions)

◆ generate_wireframe() [2/2]

static AimsTimeSurface< 2, Void > * aims::SurfaceGenerator::generate_wireframe ( const carto::GenericObject & params)
static

◆ grid() [1/2]

static AimsTimeSurface< 2, Void > * aims::SurfaceGenerator::grid ( const carto::GenericObject & params)
static

◆ grid() [2/2]

static AimsTimeSurface< 2, Void > * aims::SurfaceGenerator::grid ( const Point3df & boundingbox_min,
const Point3df & boundingbox_max,
const Point3df & grid_sampling )
static

Grid wireframe.

Similar to parallelepiped_wireframe, with a regular grid sampling.

◆ icosahedron() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::icosahedron ( const carto::GenericObject & params)
static

Sphere generation functions by Manik Bhattacharjee (CNRS UPR640 - LENA)

Example of config file:

attributes = {
'type' : 'sphere',
'point1' : [ 11, 11, -10 ],
'radius' : 45,
'nfacets' : 100,
}

◆ icosahedron() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::icosahedron ( const Point3df & center,
float radius )
static

◆ icosphere() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::icosphere ( const carto::GenericObject & params)
static

◆ icosphere() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::icosphere ( const Point3df & center,
float radius,
unsigned nfacets )
static

◆ parallelepiped() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::parallelepiped ( const carto::GenericObject & params)
static

◆ parallelepiped() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::parallelepiped ( const Point3df & boundingbox_min,
const Point3df & boundingbox_max,
bool smooth = false )
static

◆ parallelepiped_wireframe() [1/2]

static AimsTimeSurface< 2, Void > * aims::SurfaceGenerator::parallelepiped_wireframe ( const carto::GenericObject & params)
static

◆ parallelepiped_wireframe() [2/2]

static AimsTimeSurface< 2, Void > * aims::SurfaceGenerator::parallelepiped_wireframe ( const Point3df & boundingbox_min,
const Point3df & boundingbox_max )
static

◆ printDescription()

static void aims::SurfaceGenerator::printDescription ( std::ostream & s = std::cout)
static

outputs the description() dictionary in a more huma-readable way

◆ printDescription_wireframe()

static void aims::SurfaceGenerator::printDescription_wireframe ( std::ostream & s = std::cout)
static

◆ sphere() [1/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::sphere ( const carto::GenericObject & params)
static

◆ sphere() [2/2]

static AimsSurfaceTriangle * aims::SurfaceGenerator::sphere ( const Point3df & p1,
float radius,
unsigned nfacets,
bool uniquevertices = false )
static

The documentation for this class was generated from the following file: