10 #ifndef CMZN_FIELD_HPP__
11 #define CMZN_FIELD_HPP__
13 #include "opencmiss/zinc/field.h"
20 class Differentialoperator;
24 class FieldEdgeDiscontinuity;
25 class FieldEigenvalues;
26 class FieldElementGroup;
27 class FieldFindMeshLocation;
28 class FieldFiniteElement;
31 class FieldImagefilterBinaryThreshold;
32 class FieldImagefilterDiscreteGaussian;
33 class FieldImagefilterHistogram;
34 class FieldImagefilterThreshold;
35 class FieldMeshIntegral;
37 class FieldStoredMeshLocation;
38 class FieldStoredString;
62 explicit Field(cmzn_field_id field_id) : id(field_id)
65 Field(
const Field& field) : id(cmzn_field_access(field.id))
70 cmzn_field_id temp_id = cmzn_field_access(field.id);
73 cmzn_field_destroy(&
id);
83 cmzn_field_destroy(&
id);
258 return cmzn_field_is_managed(
id);
275 return cmzn_field_set_managed(
id, value);
291 return cmzn_field_get_component_name(
id, componentNumber);
304 return cmzn_field_set_component_name(
id, componentNumber, name);
315 return cmzn_field_get_coordinate_system_focus(
id);
328 return cmzn_field_set_coordinate_system_focus(
id, focus);
339 cmzn_field_get_coordinate_system_type(
id));
353 return cmzn_field_set_coordinate_system_type(
id,
354 static_cast<cmzn_field_coordinate_system_type>(coordinateSystemType));
364 return cmzn_field_get_number_of_components(
id);
375 return cmzn_field_get_name(
id);
387 return cmzn_field_set_name(
id, name);
397 return cmzn_field_get_number_of_source_fields(
id);
410 return Field(cmzn_field_get_source_field(
id, index));
421 return cmzn_field_is_type_coordinate(
id);
435 return cmzn_field_set_type_coordinate(
id, value);
445 return static_cast<ValueType>(cmzn_field_get_value_type(
id));
468 int coordinatesCount,
const double *coordinatesIn);
510 double *coordinatesOut);
557 const Fieldcache& cache,
int valuesCount,
double *valuesOut);
696 inline bool operator==(
const Field& a,
const Field& b)
698 return a.getId() == b.getId();
710 cmzn_fielditerator_id id;
723 id(cmzn_fielditerator_access(fielditerator.id))
728 cmzn_fielditerator_id temp_id = cmzn_fielditerator_access(fielditerator.id);
731 cmzn_fielditerator_destroy(&
id);
741 cmzn_fielditerator_destroy(&
id);
764 return Field(cmzn_fielditerator_next(
id));
int evaluateDerivative(const Differentialoperator&differentialOperator, const Fieldcache &cache, int valuesCount, double *valuesOut)
Definition: fieldcache.hpp:226
Definition: field.hpp:114
Definition: field.hpp:131
Definition: field.hpp:225
A single finite element from a mesh.
Definition: element.hpp:219
FieldNodeGroup castNodeGroup()
Definition: fieldsubobjectgroup.hpp:106
bool isValid() const
Definition: field.hpp:92
A real-valued interpolated field.
Definition: fieldfiniteelement.hpp:31
FieldImagefilterDiscreteGaussian castImagefilterDiscreteGaussian()
Definition: fieldimageprocessing.hpp:765
ChangeFlag
Definition: field.hpp:110
Definition: field.hpp:116
Definition: field.hpp:162
Element evaluateMeshLocation(const Fieldcache &cache, int coordinatesCount, double *coordinatesOut)
Definition: fieldcache.hpp:209
A field which defines a subset of elements from a master mesh.
Definition: fieldsubobjectgroup.hpp:31
char * getName()
Definition: field.hpp:373
FieldElementGroup castElementGroup()
Definition: fieldsubobjectgroup.hpp:95
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:50
int assignReal(const Fieldcache &cache, int valuesCount, const double *valuesIn)
Definition: fieldcache.hpp:199
Definition: field.hpp:120
FieldStoredString castStoredString()
Definition: fieldfiniteelement.hpp:523
FieldFindMeshLocation castFindMeshLocation()
Definition: fieldfiniteelement.hpp:493
CoordinateSystemType getCoordinateSystemType()
Definition: field.hpp:336
FieldComponent castComponent()
Definition: fieldcomposite.hpp:167
bool isTypeCoordinate()
Definition: field.hpp:419
Definition: field.hpp:219
int setCoordinateSystemFocus(double focus)
Definition: field.hpp:326
int setName(const char *name)
Definition: field.hpp:385
Definition: field.hpp:211
Field getSourceField(int index)
Definition: field.hpp:408
Definition: field.hpp:244
FieldImage castImage()
Definition: fieldimage.hpp:580
Definition: field.hpp:154
int getNumberOfComponents()
Definition: field.hpp:362
Describes the derivative of a field to evaluate.
Definition: differentialoperator.hpp:26
FieldFiniteElement castFiniteElement()
Definition: fieldfiniteelement.hpp:463
Definition: field.hpp:215
int assignString(const Fieldcache &cache, const char *stringValue)
Definition: fieldcache.hpp:204
A field which defines a subset of nodes from a master nodeset.
Definition: fieldsubobjectgroup.hpp:64
A field which stores and returns string values at nodes.
Definition: fieldfiniteelement.hpp:375
Definition: field.hpp:152
char * getComponentName(int componentNumber)
Definition: field.hpp:289
A field returning one or more components of a source field in a specified order.
Definition: fieldcomposite.hpp:54
Definition: field.hpp:112
Image processing derived field type performing the ITK discrete gaussian filter.
Definition: fieldimageprocessing.hpp:226
FieldEdgeDiscontinuity castEdgeDiscontinuity()
Definition: fieldfiniteelement.hpp:475
A field calculating the integral over a mesh.
Definition: fieldmeshoperators.hpp:33
Parameters for smoothing a field.
Definition: fieldsmoothing.hpp:28
char * evaluateString(const Fieldcache &cache)
Definition: fieldcache.hpp:221
Definition: field.hpp:221
cmzn_field_id getId() const
Definition: field.hpp:102
A field measuring discontinuity between surface elements.
Definition: fieldfiniteelement.hpp:123
An image-based field giving the pixel colour/intensity values.
Definition: fieldimage.hpp:31
bool isDefinedAtLocation(const Fieldcache &cache)
Definition: fieldcache.hpp:233
A field storing locations within a mesh.
Definition: fieldfiniteelement.hpp:357
Definition: field.hpp:124
int setManaged(bool value)
Definition: field.hpp:273
int DomainTypes
Definition: field.hpp:232
DomainType
Definition: field.hpp:209
Definition: field.hpp:156
Definition: field.hpp:242
int ChangeFlags
Definition: field.hpp:141
CoordinateSystemType
Definition: field.hpp:150
Field next()
Definition: field.hpp:762
FieldGroup castGroup()
Definition: fieldgroup.hpp:365
Definition: field.hpp:240
bool isValid() const
Definition: field.hpp:750
FieldImagefilterHistogram castImagefilterHistogram()
Definition: fieldimageprocessing.hpp:786
int assignMeshLocation(const Fieldcache &cache, const Element &element, int coordinatesCount, const double *coordinatesIn)
Definition: fieldcache.hpp:192
Image processing derived field type performing the ITK threshold filter.
Definition: fieldimageprocessing.hpp:569
int smooth(const Fieldsmoothing &fieldsmoothing)
Definition: fieldsmoothing.hpp:124
FieldMeshIntegral castMeshIntegral()
Definition: fieldmeshoperators.hpp:182
FieldStoredMeshLocation castStoredMeshLocation()
Definition: fieldfiniteelement.hpp:512
Container/manager of fields and domains within a region.
Definition: fieldmodule.hpp:134
Cache for setting domain locations at which fields are evaluated or assigned.
Definition: fieldcache.hpp:33
int setTypeCoordinate(bool value)
Definition: field.hpp:433
int setComponentName(int componentNumber, const char *name)
Definition: field.hpp:302
Definition: field.hpp:217
ValueType
Definition: field.hpp:238
Definition: field.hpp:184
bool isManaged()
Definition: field.hpp:256
Image processing derived field type performing the ITK histogram field.
Definition: fieldimageprocessing.hpp:302
ValueType getValueType()
Definition: field.hpp:443
Definition: field.hpp:133
A generic group field used for grouping local subobjects.
Definition: fieldgroup.hpp:35
Image processing derived field type performing the ITK binary threshold filter.
Definition: fieldimageprocessing.hpp:80
double getCoordinateSystemFocus()
Definition: field.hpp:313
Definition: field.hpp:246
Definition: field.hpp:223
Definition: field.hpp:118
FieldEigenvalues castEigenvalues()
Definition: fieldmatrixoperators.hpp:213
Definition: field.hpp:127
Definition: field.hpp:213
Definition: field.hpp:168
int getNumberOfSourceFields()
Definition: field.hpp:395
FieldImagefilterBinaryThreshold castImagefilterBinaryThreshold()
Definition: fieldimageprocessing.hpp:724
Definition: field.hpp:176
int evaluateReal(const Fieldcache &cache, int valuesCount, double *valuesOut)
Definition: fieldcache.hpp:216
int setCoordinateSystemType(CoordinateSystemType coordinateSystemType)
Definition: field.hpp:351
An iterator for looping through all the fields in a fieldmodule.
Definition: field.hpp:706
FieldImagefilterThreshold castImagefilterThreshold()
Definition: fieldimageprocessing.hpp:824
A field calculating the eigenvalues.
Definition: fieldmatrixoperators.hpp:50
A field that computes the location in a mesh.
Definition: fieldfiniteelement.hpp:261
Fieldmodule getFieldmodule() const
Definition: fieldmodule.hpp:1774