10 #ifndef CMZN_FIELD_HPP__
11 #define CMZN_FIELD_HPP__
13 #include "zinc/field.h"
20 class Differentialoperator;
24 class FieldElementGroup;
25 class FieldFindMeshLocation;
26 class FieldFiniteElement;
29 class FieldImagefilterBinaryThreshold;
30 class FieldImagefilterDiscreteGaussian;
31 class FieldImagefilterHistogram;
32 class FieldImagefilterThreshold;
34 class FieldStoredMeshLocation;
35 class FieldStoredString;
58 explicit Field(cmzn_field_id field_id) : id(field_id)
61 Field(
const Field& field) : id(cmzn_field_access(field.id))
66 cmzn_field_id temp_id = cmzn_field_access(field.id);
69 cmzn_field_destroy(&
id);
79 cmzn_field_destroy(&
id);
239 return cmzn_field_is_managed(
id);
256 return cmzn_field_set_managed(
id, value);
272 return cmzn_field_get_component_name(
id, componentNumber);
285 return cmzn_field_set_component_name(
id, componentNumber, name);
296 return cmzn_field_get_coordinate_system_focus(
id);
309 return cmzn_field_set_coordinate_system_focus(
id, focus);
320 cmzn_field_get_coordinate_system_type(
id));
334 return cmzn_field_set_coordinate_system_type(
id,
335 static_cast<cmzn_field_coordinate_system_type>(coordinateSystemType));
345 return cmzn_field_get_number_of_components(
id);
356 return cmzn_field_get_name(
id);
368 return cmzn_field_set_name(
id, name);
378 return cmzn_field_get_number_of_source_fields(
id);
391 return Field(cmzn_field_get_source_field(
id, index));
402 return cmzn_field_is_type_coordinate(
id);
416 return cmzn_field_set_type_coordinate(
id, value);
426 return static_cast<ValueType>(cmzn_field_get_value_type(
id));
448 int coordinatesCount,
const double *coordinatesIn);
489 double *coordinatesOut);
536 const Fieldcache& cache,
int valuesCount,
double *valuesOut);
645 inline bool operator==(
const Field& a,
const Field& b)
647 return a.getId() == b.getId();
659 cmzn_fielditerator_id id;
672 id(cmzn_fielditerator_access(fielditerator.id))
677 cmzn_fielditerator_id temp_id = cmzn_fielditerator_access(fielditerator.id);
680 cmzn_fielditerator_destroy(&
id);
690 cmzn_fielditerator_destroy(&
id);
713 return Field(cmzn_fielditerator_next(
id));
int evaluateDerivative(const Differentialoperator&differentialOperator, const Fieldcache &cache, int valuesCount, double *valuesOut)
Definition: fieldcache.hpp:225
Definition: field.hpp:110
Definition: field.hpp:127
Definition: field.hpp:206
A single finite element from a mesh.
Definition: element.hpp:205
FieldNodeGroup castNodeGroup()
Definition: fieldsubobjectgroup.hpp:106
bool isValid() const
Definition: field.hpp:88
A real-valued field defined by element basis.
Definition: fieldfiniteelement.hpp:29
FieldImagefilterDiscreteGaussian castImagefilterDiscreteGaussian()
Definition: fieldimageprocessing.hpp:768
ChangeFlag
Definition: field.hpp:106
Definition: field.hpp:112
Definition: field.hpp:158
Element evaluateMeshLocation(const Fieldcache &cache, int coordinatesCount, double *coordinatesOut)
Definition: fieldcache.hpp:208
A field which defines a subset of elements from a master mesh.
Definition: fieldsubobjectgroup.hpp:31
char * getName()
Definition: field.hpp:354
FieldElementGroup castElementGroup()
Definition: fieldsubobjectgroup.hpp:95
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:46
int assignReal(const Fieldcache &cache, int valuesCount, const double *valuesIn)
Definition: fieldcache.hpp:198
Definition: field.hpp:116
FieldStoredString castStoredString()
Definition: fieldfiniteelement.hpp:252
FieldFindMeshLocation castFindMeshLocation()
Definition: fieldfiniteelement.hpp:222
CoordinateSystemType getCoordinateSystemType()
Definition: field.hpp:317
FieldComponent castComponent()
Definition: fieldcomposite.hpp:131
bool isTypeCoordinate()
Definition: field.hpp:400
Definition: field.hpp:200
int setCoordinateSystemFocus(double focus)
Definition: field.hpp:307
int setName(const char *name)
Definition: field.hpp:366
Definition: field.hpp:192
Field getSourceField(int index)
Definition: field.hpp:389
Definition: field.hpp:225
FieldImage castImage()
Definition: fieldimage.hpp:563
Definition: field.hpp:150
int getNumberOfComponents()
Definition: field.hpp:343
Describes the derivative of a field to evaluate.
Definition: differentialoperator.hpp:26
FieldFiniteElement castFiniteElement()
Definition: fieldfiniteelement.hpp:204
Definition: field.hpp:196
int assignString(const Fieldcache &cache, const char *stringValue)
Definition: fieldcache.hpp:203
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:185
Definition: field.hpp:148
char * getComponentName(int componentNumber)
Definition: field.hpp:270
A field returning a single component of a source field as a scalar.
Definition: fieldcomposite.hpp:52
Definition: field.hpp:108
Image processing derived field type performing the ITK discrete gaussian filter.
Definition: fieldimageprocessing.hpp:226
char * evaluateString(const Fieldcache &cache)
Definition: fieldcache.hpp:220
Definition: field.hpp:202
cmzn_field_id getId() const
Definition: field.hpp:98
An image-based field giving the pixel colour/intensity values.
Definition: fieldimage.hpp:31
bool isDefinedAtLocation(const Fieldcache &cache)
Definition: fieldcache.hpp:232
A field storing locations within a mesh.
Definition: fieldfiniteelement.hpp:167
Definition: field.hpp:120
int setManaged(bool value)
Definition: field.hpp:254
int DomainTypes
Definition: field.hpp:213
DomainType
Definition: field.hpp:190
Definition: field.hpp:152
Definition: field.hpp:223
int ChangeFlags
Definition: field.hpp:137
CoordinateSystemType
Definition: field.hpp:146
Field next()
Definition: field.hpp:711
FieldGroup castGroup()
Definition: fieldgroup.hpp:315
Definition: field.hpp:221
bool isValid() const
Definition: field.hpp:699
FieldImagefilterHistogram castImagefilterHistogram()
Definition: fieldimageprocessing.hpp:789
int assignMeshLocation(const Fieldcache &cache, const Element &element, int coordinatesCount, const double *coordinatesIn)
Definition: fieldcache.hpp:191
Image processing derived field type performing the ITK threshold filter.
Definition: fieldimageprocessing.hpp:571
FieldStoredMeshLocation castStoredMeshLocation()
Definition: fieldfiniteelement.hpp:241
Container/manager of fields and domains within a region.
Definition: fieldmodule.hpp:126
Cache for setting domain locations at which fields are evaluated or assigned.
Definition: fieldcache.hpp:33
int setTypeCoordinate(bool value)
Definition: field.hpp:414
int setComponentName(int componentNumber, const char *name)
Definition: field.hpp:283
Definition: field.hpp:198
ValueType
Definition: field.hpp:219
Definition: field.hpp:180
bool isManaged()
Definition: field.hpp:237
Image processing derived field type performing the ITK histogram field.
Definition: fieldimageprocessing.hpp:302
ValueType getValueType()
Definition: field.hpp:424
Definition: field.hpp:129
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:294
Definition: field.hpp:227
Definition: field.hpp:204
Definition: field.hpp:114
Definition: field.hpp:123
Definition: field.hpp:194
Definition: field.hpp:164
int getNumberOfSourceFields()
Definition: field.hpp:376
FieldImagefilterBinaryThreshold castImagefilterBinaryThreshold()
Definition: fieldimageprocessing.hpp:727
Definition: field.hpp:172
int evaluateReal(const Fieldcache &cache, int valuesCount, double *valuesOut)
Definition: fieldcache.hpp:215
int setCoordinateSystemType(CoordinateSystemType coordinateSystemType)
Definition: field.hpp:332
An iterator for looping through all the fields in a fieldmodule.
Definition: field.hpp:655
FieldImagefilterThreshold castImagefilterThreshold()
Definition: fieldimageprocessing.hpp:827
A field that computes the location in a mesh.
Definition: fieldfiniteelement.hpp:71
Fieldmodule getFieldmodule() const
Definition: fieldmodule.hpp:1572