rename some filters
This commit is contained in:
parent
c34d0d31d9
commit
ae368cdfb4
@ -46,16 +46,16 @@ target_sources(pfe PRIVATE
|
||||
src/aspect_ratio_filter.h
|
||||
src/dihedral_angles_filter.cc
|
||||
src/dihedral_angles_filter.h
|
||||
src/external_points_filter.cc
|
||||
src/external_points_filter.h
|
||||
src/surface_points_filter.cc
|
||||
src/surface_points_filter.h
|
||||
src/kd_tree.cc
|
||||
src/kd_tree.h
|
||||
src/mesh_fit_filter.cc
|
||||
src/mesh_fit_filter.h
|
||||
src/point_tris_dist.cc
|
||||
src/point_tris_dist.h
|
||||
src/project_external_points_on_surface.cc
|
||||
src/project_external_points_on_surface.h)
|
||||
src/project_surface_points_on_poly.cc
|
||||
src/project_surface_points_on_poly.h)
|
||||
|
||||
target_link_libraries(pfe PRIVATE ${VTK_COMPONENTS})
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
#ifndef EXTERNAL_POINTS_FILTER_H
|
||||
#define EXTERNAL_POINTS_FILTER_H
|
||||
|
||||
|
||||
#include <vtkUnstructuredGridAlgorithm.h>
|
||||
#include <vtkIdList.h>
|
||||
|
||||
|
||||
class ExternalPointsFilter : public vtkUnstructuredGridAlgorithm {
|
||||
public:
|
||||
static ExternalPointsFilter *New();
|
||||
vtkTypeMacro(ExternalPointsFilter, vtkUnstructuredGridAlgorithm);
|
||||
vtkTypeBool RequestData(vtkInformation *request,
|
||||
vtkInformationVector **inputVector,
|
||||
vtkInformationVector *outputVector) override;
|
||||
|
||||
protected:
|
||||
~ExternalPointsFilter() override = default;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
20
src/main.cc
20
src/main.cc
@ -1,8 +1,8 @@
|
||||
#include "angles_filter.h"
|
||||
#include "aspect_ratio_filter.h"
|
||||
#include "dihedral_angles_filter.h"
|
||||
#include "external_points_filter.h"
|
||||
#include "project_external_points_on_surface.h"
|
||||
#include "surface_points_filter.h"
|
||||
#include "project_surface_points_on_poly.h"
|
||||
#include "mesh_fit_filter.h"
|
||||
#include "point_tris_dist.h"
|
||||
|
||||
@ -91,24 +91,24 @@ int main(int argc, char **argv) {
|
||||
// externalFacesFilter->DebugOn();
|
||||
// externalFacesFilter->SetInputConnection(dihedralAnglesFilter->GetOutputPort());
|
||||
|
||||
/* External points filter. */
|
||||
vtkNew<ExternalPointsFilter> externalPointsFilter;
|
||||
externalPointsFilter->SetInputConnection(dihedralAnglesFilter->GetOutputPort());
|
||||
/* Surface points filter. */
|
||||
vtkNew<SurfacePointsFilter> surfacePointsFilter;
|
||||
surfacePointsFilter->SetInputConnection(dihedralAnglesFilter->GetOutputPort());
|
||||
|
||||
|
||||
// vtkNew<MeshFitFilter> meshFitFilter;
|
||||
// meshFitFilter->SetInputConnection(externalPointsFilter->GetOutputPort());
|
||||
// meshFitFilter->SetInputConnection(surfacePointsFilter->GetOutputPort());
|
||||
|
||||
vtkNew<vtkXMLPolyDataReader> pdReader;
|
||||
pdReader->SetFileName(argv[2]);
|
||||
|
||||
vtkNew<ProjectExternalPointsOnSurface> pepouse;
|
||||
pepouse->SetInputConnection(0, externalPointsFilter->GetOutputPort());
|
||||
pepouse->SetInputConnection(1, pdReader->GetOutputPort());
|
||||
vtkNew<ProjectSurfacePointsOnPoly> project;
|
||||
project->SetInputConnection(0, surfacePointsFilter->GetOutputPort());
|
||||
project->SetInputConnection(1, pdReader->GetOutputPort());
|
||||
|
||||
|
||||
vtkNew<vtkUnstructuredGridWriter> writer;
|
||||
writer->SetInputConnection(pepouse->GetOutputPort());
|
||||
writer->SetInputConnection(project->GetOutputPort());
|
||||
writer->SetFileTypeToASCII();
|
||||
writer->SetFileName("out.vtk");
|
||||
writer->Write();
|
||||
|
@ -1,23 +0,0 @@
|
||||
#ifndef PROJECT_EXTERNAL_POINTS_ON_SURFACE_H
|
||||
#define PROJECT_EXTERNAL_POINTS_ON_SURFACE_H
|
||||
|
||||
#include <vtkUnstructuredGridAlgorithm.h>
|
||||
#include <vtkIdList.h>
|
||||
|
||||
|
||||
class ProjectExternalPointsOnSurface : public vtkUnstructuredGridAlgorithm {
|
||||
public:
|
||||
static ProjectExternalPointsOnSurface *New();
|
||||
vtkTypeMacro(ProjectExternalPointsOnSurface, vtkUnstructuredGridAlgorithm);
|
||||
ProjectExternalPointsOnSurface();
|
||||
int FillInputPortInformation(int, vtkInformation *info) override;
|
||||
vtkTypeBool RequestData(vtkInformation *request,
|
||||
vtkInformationVector **inputVector,
|
||||
vtkInformationVector *outputVector) override;
|
||||
|
||||
protected:
|
||||
~ProjectExternalPointsOnSurface() override = default;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -1,6 +1,6 @@
|
||||
#include "point_tris_dist.h"
|
||||
|
||||
#include "project_external_points_on_surface.h"
|
||||
#include "project_surface_points_on_poly.h"
|
||||
|
||||
#include <vtkUnstructuredGrid.h>
|
||||
#include <vtkPointData.h>
|
||||
@ -16,15 +16,15 @@
|
||||
#include <limits>
|
||||
|
||||
|
||||
vtkStandardNewMacro(ProjectExternalPointsOnSurface);
|
||||
vtkStandardNewMacro(ProjectSurfacePointsOnPoly);
|
||||
|
||||
|
||||
ProjectExternalPointsOnSurface::ProjectExternalPointsOnSurface() {
|
||||
ProjectSurfacePointsOnPoly::ProjectSurfacePointsOnPoly() {
|
||||
SetNumberOfInputPorts(2);
|
||||
}
|
||||
|
||||
|
||||
int ProjectExternalPointsOnSurface::FillInputPortInformation(int port, vtkInformation *info) {
|
||||
int ProjectSurfacePointsOnPoly::FillInputPortInformation(int port, vtkInformation *info) {
|
||||
if (port == 0) {
|
||||
vtkUnstructuredGridAlgorithm::FillInputPortInformation(port, info);
|
||||
} else if (port == 1) {
|
||||
@ -36,7 +36,7 @@ int ProjectExternalPointsOnSurface::FillInputPortInformation(int port, vtkInform
|
||||
}
|
||||
|
||||
|
||||
vtkTypeBool ProjectExternalPointsOnSurface::RequestData(
|
||||
vtkTypeBool ProjectSurfacePointsOnPoly::RequestData(
|
||||
vtkInformation *request,
|
||||
vtkInformationVector **inputVector,
|
||||
vtkInformationVector *outputVector) {
|
23
src/project_surface_points_on_poly.h
Normal file
23
src/project_surface_points_on_poly.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef PROJECT_SURFACE_POINTS_ON_POLY_H
|
||||
#define PROJECT_SURFACE_POINTS_ON_POLY_H
|
||||
|
||||
#include <vtkUnstructuredGridAlgorithm.h>
|
||||
#include <vtkIdList.h>
|
||||
|
||||
|
||||
class ProjectSurfacePointsOnPoly : public vtkUnstructuredGridAlgorithm {
|
||||
public:
|
||||
static ProjectSurfacePointsOnPoly *New();
|
||||
vtkTypeMacro(ProjectSurfacePointsOnPoly, vtkUnstructuredGridAlgorithm);
|
||||
ProjectSurfacePointsOnPoly();
|
||||
int FillInputPortInformation(int, vtkInformation *info) override;
|
||||
vtkTypeBool RequestData(vtkInformation *request,
|
||||
vtkInformationVector **inputVector,
|
||||
vtkInformationVector *outputVector) override;
|
||||
|
||||
protected:
|
||||
~ProjectSurfacePointsOnPoly() override = default;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
#include "external_points_filter.h"
|
||||
#include "surface_points_filter.h"
|
||||
|
||||
#include <vtkIdList.h>
|
||||
#include <vtkUnstructuredGrid.h>
|
||||
@ -32,10 +32,10 @@ static void keep_only_dupes(std::vector<vtkIdType> &ids_a,
|
||||
}
|
||||
|
||||
|
||||
vtkStandardNewMacro(ExternalPointsFilter);
|
||||
vtkStandardNewMacro(SurfacePointsFilter);
|
||||
|
||||
|
||||
vtkTypeBool ExternalPointsFilter::RequestData(
|
||||
vtkTypeBool SurfacePointsFilter::RequestData(
|
||||
vtkInformation *request,
|
||||
vtkInformationVector **inputVector,
|
||||
vtkInformationVector *outputVector) {
|
22
src/surface_points_filter.h
Normal file
22
src/surface_points_filter.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef SURFACE_POINT_FILTER_H
|
||||
#define SURFACE_POINT_FILTER_H
|
||||
|
||||
|
||||
#include <vtkUnstructuredGridAlgorithm.h>
|
||||
#include <vtkIdList.h>
|
||||
|
||||
|
||||
class SurfacePointsFilter : public vtkUnstructuredGridAlgorithm {
|
||||
public:
|
||||
static SurfacePointsFilter *New();
|
||||
vtkTypeMacro(SurfacePointsFilter, vtkUnstructuredGridAlgorithm);
|
||||
vtkTypeBool RequestData(vtkInformation *request,
|
||||
vtkInformationVector **inputVector,
|
||||
vtkInformationVector *outputVector) override;
|
||||
|
||||
protected:
|
||||
~SurfacePointsFilter() override = default;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user