9 #ifndef CMZN_FIELDIMAGEPROCESSING_HPP__
10 #define CMZN_FIELDIMAGEPROCESSING_HPP__
12 #include "zinc/field.hpp"
13 #include "zinc/fieldimageprocessing.h"
14 #include "zinc/fieldmodule.hpp"
20 class FieldImagefilterBinaryDilate :
public Field
34 explicit FieldImagefilterBinaryDilate(cmzn_field_id field_id) : Field(field_id)
37 friend FieldImagefilterBinaryDilate
39 int radius,
double dilate_value);
43 FieldImagefilterBinaryDilate() : Field(0)
47 class FieldImagefilterBinaryErode :
public Field
61 explicit FieldImagefilterBinaryErode(cmzn_field_id field_id) : Field(field_id)
64 friend FieldImagefilterBinaryErode
66 int radius,
double erode_value);
70 FieldImagefilterBinaryErode() : Field(0)
89 Field(reinterpret_cast<cmzn_field_id>(field_imagefilter_binary_threshold_id))
99 return cmzn_field_imagefilter_binary_threshold_get_lower_threshold(
100 reinterpret_cast<cmzn_field_imagefilter_binary_threshold_id>(
id));
111 return cmzn_field_imagefilter_binary_threshold_set_lower_threshold(
112 reinterpret_cast<cmzn_field_imagefilter_binary_threshold_id>(
id),
123 return cmzn_field_imagefilter_binary_threshold_get_upper_threshold(
124 reinterpret_cast<cmzn_field_imagefilter_binary_threshold_id>(
id));
135 return cmzn_field_imagefilter_binary_threshold_set_upper_threshold(
136 reinterpret_cast<cmzn_field_imagefilter_binary_threshold_id>(
id),
141 class FieldImagefilterCannyEdgeDetection :
public Field
153 explicit FieldImagefilterCannyEdgeDetection(cmzn_field_id field_id) : Field(field_id)
156 friend FieldImagefilterCannyEdgeDetection
158 double variance,
double maximumError,
double upperThreshold,
double lowerThreshold);
162 FieldImagefilterCannyEdgeDetection() : Field(0)
166 class FieldImagefilterConnectedThreshold :
public Field
179 explicit FieldImagefilterConnectedThreshold(cmzn_field_id field_id) : Field(field_id)
182 friend FieldImagefilterConnectedThreshold
184 double lowerThreshold,
double upperThreshold,
double replaceValue,
185 int dimension,
int seedPointsCount,
const double *seedPoints);
189 FieldImagefilterConnectedThreshold() : Field(0)
193 class FieldImagefilterCurvatureAnisotropicDiffusion :
public Field
207 explicit FieldImagefilterCurvatureAnisotropicDiffusion(cmzn_field_id field_id) : Field(field_id)
210 friend FieldImagefilterCurvatureAnisotropicDiffusion
212 double timeStep,
double conductance,
int numIterations);
216 FieldImagefilterCurvatureAnisotropicDiffusion() : Field(0)
235 Field(reinterpret_cast<cmzn_field_id>(field_imagefilter_discrete_gaussian_id))
246 return cmzn_field_imagefilter_discrete_gaussian_get_variance(
247 reinterpret_cast<cmzn_field_imagefilter_discrete_gaussian_id>(
id));
262 return cmzn_field_imagefilter_discrete_gaussian_set_variance(
263 reinterpret_cast<cmzn_field_imagefilter_discrete_gaussian_id>(
id),
275 return cmzn_field_imagefilter_discrete_gaussian_get_max_kernel_width(
276 reinterpret_cast<cmzn_field_imagefilter_discrete_gaussian_id>(
id));
290 return cmzn_field_imagefilter_discrete_gaussian_set_max_kernel_width(
291 reinterpret_cast<cmzn_field_imagefilter_discrete_gaussian_id>(
id),
311 Field(reinterpret_cast<cmzn_field_id>(field_imagefilter_histogram_id))
326 return cmzn_field_imagefilter_histogram_get_compute_minimum_values(
327 reinterpret_cast<cmzn_field_imagefilter_histogram_id>(
id),
328 valuesCount, valuesOut);
345 return cmzn_field_imagefilter_histogram_set_compute_minimum_values(
346 reinterpret_cast<cmzn_field_imagefilter_histogram_id>(
id),
347 valuesCount, valuesIn);
362 return cmzn_field_imagefilter_histogram_get_compute_maximum_values(
363 reinterpret_cast<cmzn_field_imagefilter_histogram_id>(
id),
364 valuesCount, valuesOut);
381 return cmzn_field_imagefilter_histogram_set_compute_maximum_values(
382 reinterpret_cast<cmzn_field_imagefilter_histogram_id>(
id),
383 valuesCount, valuesIn);
399 return cmzn_field_imagefilter_histogram_get_number_of_bins(
400 reinterpret_cast<cmzn_field_imagefilter_histogram_id>(
id),
401 valuesCount, valuesOut);
421 return cmzn_field_imagefilter_histogram_set_number_of_bins(
422 reinterpret_cast<cmzn_field_imagefilter_histogram_id>(
id),
423 valuesCount, valuesIn);
436 return cmzn_field_imagefilter_histogram_get_marginal_scale(
437 reinterpret_cast<cmzn_field_imagefilter_histogram_id>(
id));
451 return cmzn_field_imagefilter_histogram_set_marginal_scale(
452 reinterpret_cast<cmzn_field_imagefilter_histogram_id>(
id),
457 class FieldImagefilterGradientMagnitudeRecursiveGaussian :
public Field
471 explicit FieldImagefilterGradientMagnitudeRecursiveGaussian(cmzn_field_id field_id) : Field(field_id)
474 friend FieldImagefilterGradientMagnitudeRecursiveGaussian
480 FieldImagefilterGradientMagnitudeRecursiveGaussian() : Field(0)
484 class FieldImagefilterRescaleIntensity :
public Field
497 explicit FieldImagefilterRescaleIntensity(cmzn_field_id field_id) : Field(field_id)
500 friend FieldImagefilterRescaleIntensity
502 double outputMin,
double outputMax);
506 FieldImagefilterRescaleIntensity() : Field(0)
511 class FieldImagefilterMean :
public Field
525 explicit FieldImagefilterMean(cmzn_field_id field_id) : Field(field_id)
528 friend FieldImagefilterMean
530 int valuesCount,
const int *radiusSizesIn);
534 FieldImagefilterMean() : Field(0)
538 class FieldImagefilterSigmoid :
public Field
551 explicit FieldImagefilterSigmoid(cmzn_field_id field_id) : Field(field_id)
554 friend FieldImagefilterSigmoid
556 double min,
double max,
double alpha,
double beta);
560 FieldImagefilterSigmoid() : Field(0)
580 Field(reinterpret_cast<cmzn_field_id>(field_imagefilter_threshold_id))
607 return static_cast<Condition>(cmzn_field_imagefilter_threshold_get_condition(
608 reinterpret_cast<cmzn_field_imagefilter_threshold_id>(
id)));
622 return cmzn_field_imagefilter_threshold_set_condition(
623 reinterpret_cast<cmzn_field_imagefilter_threshold_id>(
id),
624 static_cast<cmzn_field_imagefilter_threshold_condition>(condition));
634 return cmzn_field_imagefilter_threshold_get_outside_value(
635 reinterpret_cast<cmzn_field_imagefilter_threshold_id>(
id));
646 return cmzn_field_imagefilter_threshold_set_outside_value(
647 reinterpret_cast<cmzn_field_imagefilter_threshold_id>(
id), outsideValue);
657 return cmzn_field_imagefilter_threshold_get_lower_threshold(
658 reinterpret_cast<cmzn_field_imagefilter_threshold_id>(
id));
671 return cmzn_field_imagefilter_threshold_set_lower_threshold(
672 reinterpret_cast<cmzn_field_imagefilter_threshold_id>(
id), lowerValue);
682 return cmzn_field_imagefilter_threshold_get_upper_threshold(
683 reinterpret_cast<cmzn_field_imagefilter_threshold_id>(
id));
696 return cmzn_field_imagefilter_threshold_set_upper_threshold(
697 reinterpret_cast<cmzn_field_imagefilter_threshold_id>(
id), upperValue);
702 inline FieldImagefilterBinaryDilate
704 int radius,
double dilate_value)
707 cmzn_fieldmodule_create_field_imagefilter_binary_dilate(
id, sourceField.
getId(),
708 radius, dilate_value));
713 int radius,
double erode_value)
716 cmzn_fieldmodule_create_field_imagefilter_binary_erode(
id, sourceField.
getId(),
717 radius, erode_value));
724 cmzn_fieldmodule_create_field_imagefilter_binary_threshold(
id, sourceField.
getId())));
734 double variance,
double maximumError,
double upperThreshold,
double lowerThreshold)
737 cmzn_fieldmodule_create_field_imagefilter_canny_edge_detection(
738 id, sourceField.
getId(),
739 variance, maximumError, upperThreshold, lowerThreshold));
744 double lowerThreshold,
double upperThreshold,
double replaceValue,
745 int dimension,
int seedPointsCount,
const double *seedPoints)
748 cmzn_fieldmodule_create_field_imagefilter_connected_threshold(
id, sourceField.
getId(),
749 lowerThreshold, upperThreshold, replaceValue, seedPointsCount, dimension, seedPoints));
754 double timeStep,
double conductance,
int numIterations)
757 cmzn_fieldmodule_create_field_imagefilter_curvature_anisotropic_diffusion(
id, sourceField.
getId(),
758 timeStep, conductance, numIterations));
765 cmzn_fieldmodule_create_field_imagefilter_discrete_gaussian(
id, sourceField.
getId())));
778 cmzn_fieldmodule_create_field_imagefilter_gradient_magnitude_recursive_gaussian(
id,
779 sourceField.
getId(), sigma));
786 cmzn_fieldmodule_create_field_imagefilter_histogram(
id, sourceField.
getId())));
796 double outputMin,
double outputMax)
799 cmzn_fieldmodule_create_field_imagefilter_rescale_intensity(
id,
800 sourceField.
getId(), outputMin, outputMax));
804 int valuesCount,
const int *radiusSizesIn)
807 id, sourceField.
getId(), valuesCount, radiusSizesIn));
812 double min,
double max,
double alpha,
double beta)
815 cmzn_fieldmodule_create_field_imagefilter_sigmoid(
id,
816 sourceField.
getId(), min, max, alpha, beta));
823 cmzn_fieldmodule_create_field_imagefilter_threshold(
824 id, sourceField.
getId())));
A field performing ITK binary dilate image filter on scalar source field image.
Definition: fieldimageprocessing.hpp:30
int getMaxKernelWidth()
Definition: fieldimageprocessing.hpp:273
FieldImagefilterCannyEdgeDetection createFieldImagefilterCannyEdgeDetection(const Field &sourceField, double variance, double maximumError, double upperThreshold, double lowerThreshold)
Definition: fieldimageprocessing.hpp:733
FieldImagefilterDiscreteGaussian castImagefilterDiscreteGaussian()
Definition: fieldimageprocessing.hpp:768
int setOutsideValue(double outsideValue)
Definition: fieldimageprocessing.hpp:644
FieldImagefilterDiscreteGaussian createFieldImagefilterDiscreteGaussian(const Field &sourceField)
Definition: fieldimageprocessing.hpp:762
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:46
Definition: fieldimageprocessing.hpp:591
FieldImagefilterBinaryDilate createFieldImagefilterBinaryDilate(const Field &sourceField, int radius, double dilate_value)
Definition: fieldimageprocessing.hpp:703
int setComputeMaximumValues(int valuesCount, const double *valuesIn)
Definition: fieldimageprocessing.hpp:379
double getVariance()
Definition: fieldimageprocessing.hpp:244
int setLowerThreshold(double lowerThreshold)
Definition: fieldimageprocessing.hpp:109
FieldImagefilterCurvatureAnisotropicDiffusion createFieldImagefilterCurvatureAnisotropicDiffusion(const Field &sourceField, double timeStep, double conductance, int numIterations)
Definition: fieldimageprocessing.hpp:753
int setVariance(double variance)
Definition: fieldimageprocessing.hpp:260
int setCondition(Condition condition)
Definition: fieldimageprocessing.hpp:620
int getNumberOfBins(int valuesCount, int *valuesOut)
Definition: fieldimageprocessing.hpp:397
FieldImagefilterBinaryErode createFieldImagefilterBinaryErode(const Field &sourceField, int radius, double erode_value)
Definition: fieldimageprocessing.hpp:712
FieldImagefilterHistogram createFieldImagefilterHistogram(const Field &sourceField)
Definition: fieldimageprocessing.hpp:783
FieldImagefilterRescaleIntensity createFieldImagefilterRescaleIntensity(const Field &sourceField, double outputMin, double outputMax)
Definition: fieldimageprocessing.hpp:795
double getLowerThreshold()
Definition: fieldimageprocessing.hpp:97
Definition: fieldimageprocessing.hpp:593
double getUpperThreshold()
Definition: fieldimageprocessing.hpp:680
Image processing derived field type performing the ITK discrete gaussian filter.
Definition: fieldimageprocessing.hpp:226
A field returning result of ITK canny edge detection filter on the source field image.
Definition: fieldimageprocessing.hpp:149
int setNumberOfBins(int valuesCount, const int *valuesIn)
Definition: fieldimageprocessing.hpp:419
A field performing ITK connected threshold image filter on scalar source field image.
Definition: fieldimageprocessing.hpp:174
cmzn_field_id getId() const
Definition: field.hpp:98
FieldImagefilterMean createFieldImagefilterMean(const Field &sourceField, int valuesCount, const int *radiusSizesIn)
Definition: fieldimageprocessing.hpp:803
Condition
Definition: fieldimageprocessing.hpp:587
double getOutsideValue()
Definition: fieldimageprocessing.hpp:632
Definition: fieldimageprocessing.hpp:596
int setUpperThreshold(double upperValue)
Definition: fieldimageprocessing.hpp:694
enum Condition getCondition()
Definition: fieldimageprocessing.hpp:605
FieldImagefilterConnectedThreshold createFieldImagefilterConnectedThreshold(const Field &sourceField, double lowerThreshold, double upperThreshold, double replaceValue, int dimension, int seedPointsCount, const double *seedPoints)
Definition: fieldimageprocessing.hpp:743
A field performing ITK mean image filter on source_field image.
Definition: fieldimageprocessing.hpp:520
int setUpperThreshold(double upperThreshold)
Definition: fieldimageprocessing.hpp:133
FieldImagefilterHistogram castImagefilterHistogram()
Definition: fieldimageprocessing.hpp:789
Image processing derived field type performing the ITK threshold filter.
Definition: fieldimageprocessing.hpp:571
double getMarginalScale()
Definition: fieldimageprocessing.hpp:434
A field performing ITK curvature anisotropic diffusion image filter on scalar source field image...
Definition: fieldimageprocessing.hpp:202
int setLowerThreshold(double lowerValue)
Definition: fieldimageprocessing.hpp:669
FieldImagefilterThreshold createFieldImagefilterThreshold(const Field &sourceField)
Definition: fieldimageprocessing.hpp:820
A field performing ITK binary erode image filter on scalar source field image.
Definition: fieldimageprocessing.hpp:57
double getLowerThreshold()
Definition: fieldimageprocessing.hpp:655
Image processing derived field type performing the ITK histogram field.
Definition: fieldimageprocessing.hpp:302
A field performing ITK gradient magnitude recursive gaussian image filter on scalar source field imag...
Definition: fieldimageprocessing.hpp:466
int setComputeMinimumValues(int valuesCount, const double *valuesIn)
Definition: fieldimageprocessing.hpp:343
Definition: fieldimageprocessing.hpp:589
double getUpperThreshold()
Definition: fieldimageprocessing.hpp:121
Image processing derived field type performing the ITK binary threshold filter.
Definition: fieldimageprocessing.hpp:80
A field performing ITK sigmoid image filter on scalar source field image.
Definition: fieldimageprocessing.hpp:546
FieldImagefilterBinaryThreshold createFieldImagefilterBinaryThreshold(const Field &sourceField)
Definition: fieldimageprocessing.hpp:721
A field performing ITK rescale intensity image filter on scalar source field image.
Definition: fieldimageprocessing.hpp:492
int getComputeMaximumValues(int valuesCount, double *valuesOut)
Definition: fieldimageprocessing.hpp:360
int setMarginalScale(double marginalScale)
Definition: fieldimageprocessing.hpp:449
FieldImagefilterGradientMagnitudeRecursiveGaussian createFieldImagefilterGradientMagnitudeRecursiveGaussian(const Field &sourceField, double sigma)
Definition: fieldimageprocessing.hpp:774
FieldImagefilterBinaryThreshold castImagefilterBinaryThreshold()
Definition: fieldimageprocessing.hpp:727
int setMaxKernelWidth(int maxKernelWidth)
Definition: fieldimageprocessing.hpp:288
FieldImagefilterSigmoid createFieldImagefilterSigmoid(const Field &sourceField, double min, double max, double alpha, double beta)
Definition: fieldimageprocessing.hpp:811
int getComputeMinimumValues(int valuesCount, double *valuesOut)
Definition: fieldimageprocessing.hpp:324
FieldImagefilterThreshold castImagefilterThreshold()
Definition: fieldimageprocessing.hpp:827