...
 
Commits (6)
......@@ -151,6 +151,7 @@ include(CMBInstallRules)
add_subdirectory(CMBMeshing)
find_package(SMTK REQUIRED)
find_package(nlohmann_json REQUIRED)
#needs to be after CMBMeshing so that we can link to the MeshServer
pv_process_modules()
......
......@@ -5893,6 +5893,212 @@ associates the containing cell ID to the point.
</SourceProxy>
<SourceProxy name="ArcDepressFilter" class="vtkArcDepressFilter"
label="Depress PolyData">
<Documentation
long_help="Depresses the polydata based on arc">
write me.
</Documentation>
<InputProperty
name="Input"
command="SetInputConnection">
<ProxyGroupDomain name="groups">
<Group name="sources"/>
<Group name="filters"/>
</ProxyGroupDomain>
<DataTypeDomain name="input_type">
<DataType value="vtkPolyData"/>
</DataTypeDomain>
<Documentation>
Set the input to the Arc Depress PolyData filter.
</Documentation>
</InputProperty>
<DoubleVectorProperty
name="AddPoint"
label="Add Point"
command="AddPointToArc"
number_of_elements="3"
default_values="-1.0 0.0 0.0" >
<Documentation>
Point to be used in closest point calculation.
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name="AmountRemoved"
label="Get Amount Removed"
command="GetAmountRemoved"
number_of_elements="1"
information_only="1"
default_values="-1">
<SimpleDoubleInformationHelper/>
</DoubleVectorProperty>
<DoubleVectorProperty
name="AmountAdded"
label="Get Amount Added"
command="GetAmountAdded"
number_of_elements="1"
information_only="1"
default_values="-1">
<SimpleDoubleInformationHelper/>
</DoubleVectorProperty>
<IntVectorProperty
name="AddArc"
command="AddArc"
number_of_elements="1"
default_values="-1">
<Documentation>
Adds a new arc.
</Documentation>
</IntVectorProperty>
<IntVectorProperty
name="ArcEnable"
command="SetArcEnable"
number_of_elements="2"
default_values="-1 1">
<Documentation>
Enable the line.
</Documentation>
</IntVectorProperty>
<IntVectorProperty
name="SetFunctionToPoint"
command="SetFunctionToPoint"
number_of_elements="3"
default_values="-1 -1 -1">
<Documentation>
Set a profile function to a point
</Documentation>
</IntVectorProperty>
<IntVectorProperty
name="UseNormalDirection"
command="setUseNormalDirection"
number_of_elements="1"
default_values="-1">
<Documentation>
use normal direction to displace points.
</Documentation>
</IntVectorProperty>
<IntVectorProperty
name="ClearArc"
command="ClearActiveArcPoints"
number_of_elements="1"
default_values="-1">
<Documentation>
Clears the arc points
</Documentation>
</IntVectorProperty>
<IntVectorProperty
name="SetArcAsClosed"
command="SetArcAsClosed"
number_of_elements="1"
default_values="-1">
<Documentation>
closes the arc
</Documentation>
</IntVectorProperty>
<IntVectorProperty
name="RemoveArc"
command="RemoveArc"
number_of_elements="1"
default_values="-1">
<Documentation>
Removes the arc from server
</Documentation>
</IntVectorProperty>
<IntVectorProperty
name="ResizeOrder"
command="ResizeOrder"
number_of_elements="1"
default_values="-1">
<Documentation>
prepairs for modifing the order
</Documentation>
</IntVectorProperty>
<IntVectorProperty
name="SetOrderValue"
command="SetOrderValue"
number_of_elements="2"
default_values="-1 -1">
<Documentation>
Appends to the order a line id
</Documentation>
</IntVectorProperty>
<IntVectorProperty
name="CreateManualFunction"
command="CreateManualFunction"
number_of_elements="6"
default_values="-1 -1 0 0 0 0">
<Documentation>
Appends to the order a line id
</Documentation>
</IntVectorProperty>
<DoubleVectorProperty
name="CreateWedgeFunction"
command="CreateWedgeFunction"
number_of_elements="10"
default_values="-1 -1 0 0 0 0 0 0 0 0">
<Documentation>
Appends to the order a line id
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name="AddWeightPoint"
label="Add Weighting Point"
command="AddWeightingFunPoint"
number_of_elements="6"
default_values="-1.0 -1.0 0.0 0.0 0.0 0.0" >
<Documentation>
Add point to wighting function.
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name="AddManualDespPoint"
label="Add Desp Point"
command="AddManualDispFunPoint"
number_of_elements="6"
default_values="-1.0 -1.0 0.0 0.0 0.0 0.0" >
<Documentation>
Point to be used in closest point calculation.
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name="SetManualControlVars"
label="Set the control Varables"
command="SetManualControlRanges"
number_of_elements="6"
default_values="-1.0 -1.0 0.0 0.0 0.0 0.0" >
<Documentation>
Point to be used in closest point calculation.
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name="computeDisplacementChange"
command="computeDisplacementChangeOnPointsViaBathymetry"
number_of_elements="2"
default_values="-1.0 -1.0" >
</DoubleVectorProperty>
<!-- End of ArcDepressFilter -->
</SourceProxy>
<SourceProxy name="ClipPolygons" class="vtkClipPolygons"
label="Clip PolyData">
<Documentation
......@@ -6523,6 +6729,87 @@ associates the containing cell ID to the point.
</Property>
</SourceProxy>
<SourceProxy name="CmbApplyBathymetry"
class="vtkCMBApplyBathymetryFilter"
label="Apply bathymetry to input point sets">
<InputProperty
name="Input"
port_index="0"
command="AddInputConnection"
clean_command="RemoveInputConnections">
<ProxyGroupDomain name="groups">
<Group name="sources"/>
<Group name="filters"/>
</ProxyGroupDomain>
<DataTypeDomain name="input_type">
<DataType value="vtkDataSet"/>
</DataTypeDomain>
<Documentation>
This property specifies the input data to apply bathymetry
</Documentation>
</InputProperty>
<InputProperty
name="Source"
port_index="1"
command="AddInputConnection"
clean_command="RemoveSourceConnections">
<ProxyGroupDomain name="groups">
<Group name="sources"/>
<Group name="filters"/>
</ProxyGroupDomain>
<DataTypeDomain name="input_type">
<DataType value="vtkDataSet"/>
</DataTypeDomain>
<Documentation>
This property specifies point sets that represent bathymetry info
</Documentation>
</InputProperty>
<DoubleVectorProperty
name="ElevationRadius"
command="SetElevationRadius"
number_of_elements="1"
default_values="1.0" >
</DoubleVectorProperty>
<DoubleVectorProperty
name="HighestZValue"
command="SetHighestZValue"
number_of_elements="1"
default_values="0.0" >
</DoubleVectorProperty>
<IntVectorProperty name="UseHighestZValue"
command="SetUseHighestZValue"
number_of_elements="1"
default_values="0" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<DoubleVectorProperty
name="LowestZValue"
command="SetLowestZValue"
number_of_elements="1"
default_values="0.0" >
</DoubleVectorProperty>
<IntVectorProperty name="UseLowestZValue"
command="SetUseLowestZValue"
number_of_elements="1"
default_values="0" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty name="NoOP"
command="SetNoOP"
number_of_elements="1"
default_values="0" >
<BooleanDomain name="bool"/>
</IntVectorProperty>
<Property name="RemoveInputConnections" command="RemoveInputConnections">
</Property>
<Property name="RemoveSourceConnections" command="RemoveSourceConnections">
</Property>
<!-- End of CmbApplyBathymetry -->
</SourceProxy>
<SourceProxy name="ShepardMethod" class="vtkShepardMethod"
label="IDW Shepard Method">
<Documentation
......
......@@ -6,6 +6,8 @@ include(${VXL_CMAKE_DIR}/UseVXL.cmake)
set(CMB_Filtering_SRC
vtkAddCellDataFilter.cxx
vtkAddMeshDataArrayFilter.cxx
vtkArcDepressFilter.cxx
vtkCMBApplyBathymetryFilter.cxx
vtkClipPolygons.cxx
vtkClosestPointFilter.cxx
vtkCMBArcAutoConnectOperator.cxx
......
This diff is collapsed.
//=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#ifndef __vtkArcDepressFilter_h
#define __vtkArcDepressFilter_h
#include "cmbSystemConfig.h"
#include "vtkCMBFilteringModule.h" // For export macro
#include "vtkPolyDataAlgorithm.h"
#include <vector>
class DepArcData;
class VTKCMBFILTERING_EXPORT vtkArcDepressFilter : public vtkPolyDataAlgorithm
{
public:
vtkTypeMacro(vtkArcDepressFilter, vtkPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent) override;
static vtkArcDepressFilter* New();
void ClearActiveArcPoints(int arc_ind);
void SetAxis(int axis);
void AddPointToArc(double arc_ind, double v1, double v2);
void SetArcAsClosed(int arc_ind);
void SetManualControlRanges(double arc_ind, double pointId, double minDispDist,
double maxDispDist, double minWeightDist, double maxWeightDist);
void AddArc(int arc_ind);
void RemoveArc(int arc_ind);
void SetArcEnable(int arc_ind, int isEnabled);
void CreateManualFunction(int arc_ind, int funId, int desptFunctionType, int weightFunType,
int isRelative, int isSymmetric);
void CreateWedgeFunction(double arc_ind, double funId, double weightFunType, double relative,
double mode, double clamp, double basewidth, double displacement, double slopeLeft,
double slopeRight);
void SetFunctionToPoint(int arc_ind, int ptId, int funId);
void AddWeightingFunPoint(double arc_ind, double funId, double x, double y, double m, double s);
void AddManualDispFunPoint(double arc_ind, double funId, double x, double y, double m, double s);
void ResizeOrder(int size);
void SetOrderValue(int loc, int arc_ind);
void setUseNormalDirection(int);
double GetAmountRemoved() { return amountRemoved; }
double GetAmountAdded() { return amountAdded; }
void computeDisplacementChangeOnPointsViaBathymetry(double stepSize, double radius);
//BTX
protected:
vtkArcDepressFilter();
~vtkArcDepressFilter() override;
int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
void computeDisplacement(vtkPolyData* input, vtkPolyData* output, std::vector<int>& pointChanged);
void computeChange(vtkPolyData* input, vtkPoints* originalPts, vtkPoints* newPoints,
std::vector<int>& pointChanged);
int Axis;
std::vector<DepArcData*> Arcs;
std::vector<unsigned> ApplyOrder;
bool UseNormalDirection;
double amountRemoved;
double amountAdded;
private:
vtkArcDepressFilter(const vtkArcDepressFilter&)
: vtkPolyDataAlgorithm()
{
} // Not implemented.
void operator=(const vtkArcDepressFilter&) {} // Not implemented.
bool IsProcessing;
//ETX
vtkPolyData* currentData;
};
#endif
This diff is collapsed.
//=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
// .NAME vtkCMBApplyBathymetryFilter
// .SECTION Description
#ifndef __vtkCMBApplyBathymetryFilter_h
#define __vtkCMBApplyBathymetryFilter_h
#include "vtkCMBFilteringModule.h" // For export macro
#include "vtkDataSetAlgorithm.h"
class vtkPoints;
class VTKCMBFILTERING_EXPORT vtkCMBApplyBathymetryFilter : public vtkDataSetAlgorithm
{
public:
static vtkCMBApplyBathymetryFilter* New();
vtkTypeMacro(vtkCMBApplyBathymetryFilter, vtkDataSetAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent) override;
//Description:
//Set/Get the radius of the cone to use for elevation smoothing
vtkSetMacro(ElevationRadius, double);
vtkGetMacro(ElevationRadius, double);
//Description:
//Set/Get the highest z value which the input will be set to if
// UseHighestZValue is set to true. Default is 0.0
vtkSetMacro(HighestZValue, double);
vtkGetMacro(HighestZValue, double);
// Description:
// If "on", the input points' highest z values will be set to HighestZValue
// Default is OFF
vtkBooleanMacro(UseHighestZValue, bool);
vtkSetMacro(UseHighestZValue, bool);
vtkGetMacro(UseHighestZValue, bool);
//Description:
//Set/Get the lowest z value which the input will be set to if
// UseLowestZValue is set to true. Default is 0.0
vtkSetMacro(LowestZValue, double);
vtkGetMacro(LowestZValue, double);
// Description:
// If "on", the input points' lowest z values will be set to LowestZValue
// Default is OFF;
vtkBooleanMacro(UseLowestZValue, bool);
vtkSetMacro(UseLowestZValue, bool);
vtkGetMacro(UseLowestZValue, bool);
//Description:
//Set/Get the z value which the input will be set to if
// FlattenZValues is set to true. Default is 0.0
vtkSetMacro(FlatZValue, double);
vtkGetMacro(FlatZValue, double);
// Description:
// If "on", the input points' z values will be set to FlatZValue
vtkBooleanMacro(FlattenZValues, bool);
vtkSetMacro(FlattenZValues, bool);
vtkGetMacro(FlattenZValues, bool);
// Description:
// If "on", the output is simply a shallowcopy of input
vtkBooleanMacro(NoOP, bool);
vtkSetMacro(NoOP, bool);
vtkGetMacro(NoOP, bool);
// Description:
// Value for when bathymetry field has no supporting data
vtkSetMacro(InvalidValue, double);
vtkGetMacro(InvalidValue, double);
// Description:
// Invert scalar values
vtkBooleanMacro(InvertScalars, bool);
vtkSetMacro(InvertScalars, bool);
vtkGetMacro(InvertScalars, bool);
//Description:
//Remove all connections on port 0, dataset that will be altered
//with bathymetry
void RemoveInputConnections();
//Description:
//Remove all connection on port 1, point sources
void RemoveSourceConnections();
protected:
vtkCMBApplyBathymetryFilter();
~vtkCMBApplyBathymetryFilter() override;
int FillInputPortInformation(int port, vtkInformation* info) override;
int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
vtkInformationVector* outputVector) override;
//methods for flattening mesh
bool FlattenMesh(vtkPoints*);
//methods for apply bathymetry
bool ApplyBathymetry(vtkPoints* points);
double ElevationRadius;
double HighestZValue;
bool UseHighestZValue;
double LowestZValue;
bool UseLowestZValue;
double FlatZValue;
bool FlattenZValues;
bool NoOP;
double InvalidValue;
bool InvertScalars;
class vtkCmbInternalTerrainInfo;
vtkCmbInternalTerrainInfo* TerrainInfo;
private:
vtkCMBApplyBathymetryFilter(const vtkCMBApplyBathymetryFilter&); // Not implemented.
void operator=(const vtkCMBApplyBathymetryFilter&); // Not implemented.
};
#endif