1 #ifndef CTL_REGULARIZERS_H 2 #define CTL_REGULARIZERS_H 6 #include "processing/abstractvolumefilter.h" 77 enum NeighborHood { Box3x3x3, NearestOnly };
82 void setNeighborHoodType(NeighborHood neighbors);
83 void setRegularizationStrength(
float strength);
86 QVariant parameter()
const override;
87 void setParameter(
const QVariant& parameter)
override;
90 float _strength = 0.1f;
91 NeighborHood _neighbors = NearestOnly;
96 static QMetaEnum metaEnum();
132 enum NeighborHood { Box3x3x3, NearestOnly };
135 explicit TVRegularizer(
float maxChangeIn10HU = 1.0f, NeighborHood neighbors = NearestOnly);
137 void setNeighborHoodType(NeighborHood neighbors);
138 void setRegularizationStrength(
float maxChangeIn10HU);
141 QVariant parameter()
const override;
142 void setParameter(
const QVariant& parameter)
override;
145 static constexpr
float _step = 0.02269f / 1000.0f;
146 float _strength = 10.0f;
147 NeighborHood _neighbors = NearestOnly;
152 static QMetaEnum metaEnum();
191 explicit
HuberRegularizer(
float strength = 1.0f,
float huberEdgeIn100HU = 1.0,
192 float weightZ = 1.0f,
float weightXY = 1.0f,
193 float directZweight = 1.0f);
195 void setRegularizationStrength(
float strength);
196 void setHuberEdge(
float edgeIn100HU);
197 void setRelativeWeighting(
float weightZ,
float weightXY = 1.0f);
198 void setDirectZNeighborWeight(
float weight);
201 QVariant parameter() const override;
202 void setParameter(const QVariant& parameter) override;
205 float _strength = 0.01f;
206 float _huberEdge = 100.0f * 0.02269f/1000.0f;
208 float _betaXY = 1.0f;
209 float _directZ = 1.0f;
213 constexpr
float clamp(
float val,
float low,
float high)
215 return (val<low) ? low : ((val>high) ? high : val);
221 #endif // CTL_REGULARIZERS_H The HuberRegularizer class is a regularizer based on the Huber potential function.
Definition: regularizers.h:184
void filter(VoxelVolume< float > &volume) override
Trivial implementation that does nothing.
Definition: regularizers.cpp:20
The VoxelVolume class provides a simple container for storage of voxelized 3D volume data.
Definition: ctsystemview.h:14
Definition: abstractvolumefilter.h:11
The TVRegularizer class provides an approximation of a total variation (TV) minimizing regularizer.
Definition: regularizers.h:124
#define CTL_TYPE_ID(newIndex)
Definition: serializationinterface.h:189
The IdentityRegularizer class is an implementation of AbstractVolumeFilter that does not change input...
Definition: regularizers.h:18