Documentation of 'jvx.geom.PwSmooth' Java class
PwSmooth ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.geom

Class PwSmooth

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, PsUpdateIf, PjWorkshopIf


    public class PwSmooth
    extends PjWorkshop
    implements java.lang.Runnable
    Workshop for feature preserving smoothing of surfaces. Anisotropic mean curvature flow and anisotropic prescribed mean curvature flow are implemented.
    See Also:
    Serialized Form
    Author:
    Klaus Hildebrandt
    Version:
    29.10.2016, 1.20 revised (kp) Element colors switched on by default.
    10.03.2014, 1.10 revised (kp) Code cleanup.
    00.00.2003, 1.00 created (kh)
    • Field Detail

      • METHOD_ANISOTROPIC

        public static int METHOD_ANISOTROPIC
        Anisotropic smoothing preserves and sharpens linear features.
      • METHOD_ANISO_PRESCRIBED

        public static int METHOD_ANISO_PRESCRIBED
        Prescribed anisotropic smoothing preserves sharp features and additionally avoids shrinking.
      • METHOD_ISO_PRESCRIBED

        public static int METHOD_ISO_PRESCRIBED
        Prescribed isotropic smoothing avoids shrinking.
      • METHOD_LAPLACE

        public static int METHOD_LAPLACE
        Isotropic cotan Laplacian smoothing.
    • Constructor Detail

      • PwSmooth

        public PwSmooth()
        Constructor
    • Method Detail

      • init

        public void init()
        Initializations
        Overrides:
        init in class PjWorkshop
      • setGeometry

        public void setGeometry(PgElementSet geom)
        Assign a geometry on which this workshop operates, and create a backup copy if workshop is cancelled.
      • cancel

        public void cancel()
        Description copied from class: PjWorkshop
        Cancel operation of this workshop by resetting the assigned geometry, and finally close this workshop.

        If necessary, the duplicate of the original geometry is restored into the geometry. The update method of the geometry is called.

        Overrides:
        cancel in class PjWorkshop
      • setFeatureDetect

        public void setFeatureDetect(double value)
        Set parameter that determines what is regarded as a feature when smoothing.
      • getFeatureDetect

        public double getFeatureDetect()
        Get parameter that determines what is regarded as a feature when smoothing.
      • useImplicit

        public void useImplicit(boolean flag)
        Use implicit instead of explicit method to integrate the flow.
      • isUsingImplicit

        public boolean isUsingImplicit()
        See if implicit method to integrate the flow is used.
      • setStepWidth

        public void setStepWidth(double stepWidth)
        The step width is a factor the gradient of the actual flow is multiplied with at each iteration step. This parameter is often called the time discretization of the flow. A recommended choice is between 0.01 and 0.1.
      • getStepWidth

        public double getStepWidth()
        The step width is a factor the gradient of the actual flow is multiplied with at each iteration step. This parameter is often called the time discretization of the flow. A recommended choice is between 0.01 and 0.1.
      • setMaxNumLoops

        public void setMaxNumLoops(int numLoops)
        A smoothing process is stopped after the given number of loops have been performed cp start.
      • getMaxNumLoops

        public int getMaxNumLoops()
        A smoothing process is stopped after this number of loops have been performed cp start.
      • setKeepBoundary

        public void setKeepBoundary(boolean bKeepBoundary)
        Enable/Disable moving of boundary vertices during smoothing.
      • getKeepBoundary

        public boolean getKeepBoundary()
        Get flag to enable/disable moving of boundary vertices during smoothing.
      • setKeepSelected

        public void setKeepSelected(boolean bKeepSelected)
        Enable/Disable moving of selected vertices during smoothing.
      • getKeepSelected

        public boolean getKeepSelected()
        Get flag to enable/disable moving of selected vertices during smoothing.
      • computeGradient

        public PdVector[] computeGradient()
        Compute anisotropic gradient and returns as PdVector.
        Version:
        29.03.2017, 1.10 revised (kp) Method made public since used outside.
      • smoothingStep

        public void smoothingStep()
        Perform one step of smoothing using the actually chosen method and settings.
      • colorMapGray

        public static java.awt.Color colorMapGray(double d)
        Maps (0,1) onto a Color using only gray levels.
      • colorMap

        public static java.awt.Color colorMap(double d)
        Maps (0,1) onto a Color, starting from white to red.
      • scaleGeomByVolume

        public static boolean scaleGeomByVolume(PgElementSet geom,
                                                double volume,
                                                double eps,
                                                int maxSteps)
        Rescale geometry to have a given volume. Method iteratively approximates the given value. Rescaling stops when actual volume and given volume differ less than given eps or more than given maximal number of steps have been performed.
        Parameters:
        geom - geometry to be scaled.
        volume - volume the geometry will have after rescaling.
        eps - rescaling stops when actual volume and given volume differ less than eps.
        maxSteps - stop when maximal number of steps have been performed.
        Returns:
        false if maximal number of steps has been reached, true otherwise.
      • isRunning

        public boolean isRunning()
        Check whether smoothing process will be stopped.
        Returns:
        false, if the energy minimizer will stop (just shutting down regularly).
      • isStopped

        public boolean isStopped()
        Check whether smoothing process is currently NOT running a thread.
      • start

        public void start()
        Start smoothing in separate thread.
        See Also:
        stop()
      • stop

        public void stop()
        Stop smoothing in separate thread.
      • run

        public void run()
        Do energy minimization until m_numLoops are done or until a call of stop().
        Specified by:
        run in interface java.lang.Runnable
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

Ads help maintain this website.