10 #ifndef CMZN_FIELD_HPP__
11 #define CMZN_FIELD_HPP__
13 #include "zinc/field.h"
20 class Differentialoperator;
24 class FieldEdgeDiscontinuity;
25 class FieldElementGroup;
26 class FieldFindMeshLocation;
27 class FieldFiniteElement;
30 class FieldImagefilterBinaryThreshold;
31 class FieldImagefilterDiscreteGaussian;
32 class FieldImagefilterHistogram;
33 class FieldImagefilterThreshold;
34 class FieldMeshIntegral;
36 class FieldStoredMeshLocation;
37 class FieldStoredString;
61 explicit Field(cmzn_field_id field_id) : id(field_id)
64 Field(
const Field& field) : id(cmzn_field_access(field.id))
69 cmzn_field_id temp_id = cmzn_field_access(field.id);
72 cmzn_field_destroy(&
id);
82 cmzn_field_destroy(&
id);
257 return cmzn_field_is_managed(
id);
274 return cmzn_field_set_managed(
id, value);
290 return cmzn_field_get_component_name(
id, componentNumber);
303 return cmzn_field_set_component_name(
id, componentNumber, name);
314 return cmzn_field_get_coordinate_system_focus(
id);
327 return cmzn_field_set_coordinate_system_focus(
id, focus);
338 cmzn_field_get_coordinate_system_type(
id));
352 return cmzn_field_set_coordinate_system_type(
id,
353 static_cast<cmzn_field_coordinate_system_type>(coordinateSystemType));
363 return cmzn_field_get_number_of_components(
id);
374 return cmzn_field_get_name(
id);
386 return cmzn_field_set_name(
id, name);
396 return cmzn_field_get_number_of_source_fields(
id);
409 return Field(cmzn_field_get_source_field(
id, index));
420 return cmzn_field_is_type_coordinate(
id);
434 return cmzn_field_set_type_coordinate(
id, value);
444 return static_cast<ValueType>(cmzn_field_get_value_type(
id));
467 int coordinatesCount,
const double *coordinatesIn);
509 double *coordinatesOut);
556 const Fieldcache& cache,
int valuesCount,
double *valuesOut);
688 inline bool operator==(
const Field& a,
const Field& b)
690 return a.getId() == b.getId();
702 cmzn_fielditerator_id id;
715 id(cmzn_fielditerator_access(fielditerator.id))
720 cmzn_fielditerator_id temp_id = cmzn_fielditerator_access(fielditerator.id);
723 cmzn_fielditerator_destroy(&
id);
733 cmzn_fielditerator_destroy(&
id);
756 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:113
Definition: field.hpp:130
Definition: field.hpp:224
A single finite element from a mesh.
Definition: element.hpp:219
FieldNodeGroup castNodeGroup()
Definition: fieldsubobjectgroup.hpp:106
bool isValid() const
Definition: field.hpp:91
A real-valued interpolated field.
Definition: fieldfiniteelement.hpp:30
FieldImagefilterDiscreteGaussian castImagefilterDiscreteGaussian()
Definition: fieldimageprocessing.hpp:765
ChangeFlag
Definition: field.hpp:109
Definition: field.hpp:115
Definition: field.hpp:161
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:372
FieldElementGroup castElementGroup()
Definition: fieldsubobjectgroup.hpp:95
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:49
int assignReal(const Fieldcache &cache, int valuesCount, const double *valuesIn)
Definition: fieldcache.hpp:199
Definition: field.hpp:119
FieldStoredString castStoredString()
Definition: fieldfiniteelement.hpp:483
FieldFindMeshLocation castFindMeshLocation()
Definition: fieldfiniteelement.hpp:453
CoordinateSystemType getCoordinateSystemType()
Definition: field.hpp:335
FieldComponent castComponent()
Definition: fieldcomposite.hpp:167
bool isTypeCoordinate()
Definition: field.hpp:418
Definition: field.hpp:218
int setCoordinateSystemFocus(double focus)
Definition: field.hpp:325
int setName(const char *name)
Definition: field.hpp:384
Definition: field.hpp:210
Field getSourceField(int index)
Definition: field.hpp:407
Definition: field.hpp:243
FieldImage castImage()
Definition: fieldimage.hpp:563
Definition: field.hpp:153
int getNumberOfComponents()
Definition: field.hpp:361
Describes the derivative of a field to evaluate.
Definition: differentialoperator.hpp:26
FieldFiniteElement castFiniteElement()
Definition: fieldfiniteelement.hpp:423
Definition: field.hpp:214
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:374
Definition: field.hpp:151
char * getComponentName(int componentNumber)
Definition: field.hpp:288
A field returning one or more components of a source field in a specified order.
Definition: fieldcomposite.hpp:54
Definition: field.hpp:111
Image processing derived field type performing the ITK discrete gaussian filter.
Definition: fieldimageprocessing.hpp:226
FieldEdgeDiscontinuity castEdgeDiscontinuity()
Definition: fieldfiniteelement.hpp:435
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:220
cmzn_field_id getId() const
Definition: field.hpp:101
A field measuring discontinuity between surface elements.
Definition: fieldfiniteelement.hpp:122
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:356
Definition: field.hpp:123
int setManaged(bool value)
Definition: field.hpp:272
int DomainTypes
Definition: field.hpp:231
DomainType
Definition: field.hpp:208
Definition: field.hpp:155
Definition: field.hpp:241
int ChangeFlags
Definition: field.hpp:140
CoordinateSystemType
Definition: field.hpp:149
Field next()
Definition: field.hpp:754
FieldGroup castGroup()
Definition: fieldgroup.hpp:365
Definition: field.hpp:239
bool isValid() const
Definition: field.hpp:742
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:472
Container/manager of fields and domains within a region.
Definition: fieldmodule.hpp:133
Cache for setting domain locations at which fields are evaluated or assigned.
Definition: fieldcache.hpp:33
int setTypeCoordinate(bool value)
Definition: field.hpp:432
int setComponentName(int componentNumber, const char *name)
Definition: field.hpp:301
Definition: field.hpp:216
ValueType
Definition: field.hpp:237
Definition: field.hpp:183
bool isManaged()
Definition: field.hpp:255
Image processing derived field type performing the ITK histogram field.
Definition: fieldimageprocessing.hpp:302
ValueType getValueType()
Definition: field.hpp:442
Definition: field.hpp:132
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:312
Definition: field.hpp:245
Definition: field.hpp:222
Definition: field.hpp:117
Definition: field.hpp:126
Definition: field.hpp:212
Definition: field.hpp:167
int getNumberOfSourceFields()
Definition: field.hpp:394
FieldImagefilterBinaryThreshold castImagefilterBinaryThreshold()
Definition: fieldimageprocessing.hpp:724
Definition: field.hpp:175
int evaluateReal(const Fieldcache &cache, int valuesCount, double *valuesOut)
Definition: fieldcache.hpp:216
int setCoordinateSystemType(CoordinateSystemType coordinateSystemType)
Definition: field.hpp:350
An iterator for looping through all the fields in a fieldmodule.
Definition: field.hpp:698
FieldImagefilterThreshold castImagefilterThreshold()
Definition: fieldimageprocessing.hpp:824
A field that computes the location in a mesh.
Definition: fieldfiniteelement.hpp:260
Fieldmodule getFieldmodule() const
Definition: fieldmodule.hpp:1724