Commit 3aa4a697 authored by T.J. Corona's avatar T.J. Corona Committed by Kitware Robot

Merge topic 'vtk-extension-io-parity'

e1526e03 Move mesh-related vtk io classes into mesh namespace.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Haocheng LIU's avatarHaocheng Liu <haocheng.liu@kitware.com>
Merge-request: !928
parents 87643d6f e1526e03
......@@ -35,7 +35,7 @@
#include "smtk/model/Volume.h"
#include "smtk/model/VolumeUse.h"
#include "smtk/extension/vtk/io/ImportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ImportVTKData.h"
#include "vtkCMBModelReadOperator.h"
#include "vtkCMBModelWriterV5.h"
......@@ -1576,7 +1576,7 @@ bool Session::addTessellation(
collection->removeMeshes(modified);
}
smtk::extension::vtk::io::ImportVTKData importVTKData;
smtk::extension::vtk::io::mesh::ImportVTKData importVTKData;
// Discrete models are multiblock data sets with a single set of points.
// To prevent all of these points from being copied over for each element,
......
......@@ -23,7 +23,7 @@
#include "smtk/model/Model.h"
#include "smtk/model/Tessellation.h"
#include "smtk/extension/vtk/io/ImportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ImportVTKData.h"
#include "vtkCellArray.h"
#include "vtkGeometryFilter.h"
......@@ -664,7 +664,7 @@ bool Session::addTessellation(const smtk::model::EntityRef& entityref, const Ent
collection->removeMeshes(modified);
}
smtk::extension::vtk::io::ImportVTKData importVTKData;
smtk::extension::vtk::io::mesh::ImportVTKData importVTKData;
smtk::mesh::MeshSet meshForEntity = importVTKData(bdy, collection);
if (!meshForEntity.is_empty())
{
......
......@@ -93,4 +93,4 @@ int UnitTestImportFromVTK(int argc, char* argv[])
}
// This macro ensures the vtk io library is loaded into the executable
smtkComponentInitMacro(smtk_extension_vtk_io_MeshIOVTK)
smtkComponentInitMacro(smtk_extension_vtk_io_mesh_MeshIOVTK)
......@@ -49,7 +49,7 @@
#include "vtkXMLMultiBlockDataWriter.h"
// This macro ensures the vtk io library is loaded into the executable
smtkComponentInitMacro(smtk_extension_vtk_io_MeshIOVTK)
smtkComponentInitMacro(smtk_extension_vtk_io_mesh_MeshIOVTK)
#endif
namespace
......
......@@ -179,5 +179,5 @@ int PartitionBoundariesOp(int argc, char* argv[])
}
// This macro ensures the vtk io library is loaded into the executable
smtkComponentInitMacro(smtk_extension_vtk_io_MeshIOVTK)
smtkComponentInitMacro(smtk_extension_vtk_io_mesh_MeshIOVTK)
smtkPythonInitMacro(import_from_deform, smtk.bridge.multiscale.import_from_deform, true);
set(srcs
ExportVTKData.cxx
ImportVTKData.cxx
MeshIOVTK.cxx
RedirectOutput.cxx
vtkLIDARPtsWriter.cxx # For terrain extraction
mesh/ExportVTKData.cxx
mesh/ImportVTKData.cxx
mesh/MeshIOVTK.cxx
)
set(headers
ExportVTKData.h
ImportVTKData.h
MeshIOVTK.h
RedirectOutput.h
vtkLIDARPtsWriter.h # For terrain extraction
mesh/ExportVTKData.h
mesh/ImportVTKData.h
mesh/MeshIOVTK.h
)
add_library(smtkIOVTK ${srcs})
......
......@@ -10,7 +10,7 @@
//
//=============================================================================
#include "smtk/extension/vtk/io/ExportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ExportVTKData.h"
#include "smtk/mesh/CellField.h"
#include "smtk/mesh/CellSet.h"
......@@ -58,6 +58,8 @@ namespace vtk
{
namespace io
{
namespace mesh
{
ExportVTKData::ExportVTKData()
{
......@@ -448,3 +450,4 @@ void ExportVTKData::operator()(
}
}
}
}
......@@ -9,8 +9,8 @@
// PURPOSE. See the above copyright notice for more information.
//
//=============================================================================
#ifndef __smtk_extension_vtk_io_ExportVTKData_h
#define __smtk_extension_vtk_io_ExportVTKData_h
#ifndef __smtk_extension_vtk_io_mesh_ExportVTKData_h
#define __smtk_extension_vtk_io_mesh_ExportVTKData_h
#include "smtk/extension/vtk/io/IOVTKExports.h"
//forward declarers for Manager and Collection
......@@ -38,6 +38,8 @@ namespace vtk
{
namespace io
{
namespace mesh
{
//Export an smtk::mesh::collection to a VTK data set.
class SMTKIOVTK_EXPORT ExportVTKData
......@@ -68,5 +70,6 @@ private:
}
}
}
}
#endif //__smtk_extension_vtkToMesh_ExportVTKData_h
#endif //__smtk_extension_vtk_io_mesh_ExportVTKData_h
......@@ -10,7 +10,7 @@
//
//=============================================================================
#include "smtk/extension/vtk/io/ImportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ImportVTKData.h"
#include "smtk/mesh/CellField.h"
#include "smtk/mesh/CellSet.h"
......@@ -57,7 +57,8 @@ namespace vtk
{
namespace io
{
namespace mesh
{
namespace
{
......@@ -426,3 +427,4 @@ smtk::mesh::CollectionPtr ImportVTKData::operator()(vtkUnstructuredGrid* ugrid,
}
}
}
}
......@@ -9,8 +9,8 @@
// PURPOSE. See the above copyright notice for more information.
//
//=============================================================================
#ifndef __smtk_extension_vtk_io_ImportVTKData_h
#define __smtk_extension_vtk_io_ImportVTKData_h
#ifndef __smtk_extension_vtk_io_mesh_ImportVTKData_h
#define __smtk_extension_vtk_io_mesh_ImportVTKData_h
#include "smtk/extension/vtk/io/IOVTKExports.h"
//forward declarers for Manager and Collection
......@@ -38,6 +38,8 @@ namespace vtk
{
namespace io
{
namespace mesh
{
//Import a VTK data set to a smtk::mesh::collection.
//Currently we only support creating a new database from a vtk data set.
......@@ -94,5 +96,6 @@ private:
}
}
}
}
#endif //__smtk_extension_vtkToMesh_ImportVTKData_h
#endif //__smtk_extension_vtk_io_mesh_ImportVTKData_h
......@@ -8,7 +8,7 @@
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#include "smtk/extension/vtk/io/MeshIOVTK.h"
#include "smtk/extension/vtk/io/mesh/MeshIOVTK.h"
#include "smtk/io/ExportMesh.h"
#include "smtk/io/ImportMesh.h"
......@@ -18,8 +18,8 @@
#include "smtk/mesh/Collection.h"
#include "smtk/mesh/Manager.h"
#include "smtk/extension/vtk/io/ExportVTKData.h"
#include "smtk/extension/vtk/io/ImportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ExportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ImportVTKData.h"
#include <string>
......@@ -31,6 +31,8 @@ namespace vtk
{
namespace io
{
namespace mesh
{
MeshIOVTK::MeshIOVTK()
: MeshIO()
......@@ -48,37 +50,38 @@ MeshIOVTK::MeshIOVTK()
smtk::mesh::CollectionPtr MeshIOVTK::importMesh(const std::string& filePath,
smtk::mesh::ManagerPtr& manager, const std::string& domainPropertyName) const
{
smtk::extension::vtk::io::ImportVTKData import;
smtk::extension::vtk::io::mesh::ImportVTKData import;
return import(filePath, manager, domainPropertyName);
}
bool MeshIOVTK::importMesh(const std::string& filePath, smtk::mesh::CollectionPtr collection,
const std::string& domainPropertyName) const
{
smtk::extension::vtk::io::ImportVTKData import;
smtk::extension::vtk::io::mesh::ImportVTKData import;
return import(filePath, collection, domainPropertyName);
}
bool MeshIOVTK::exportMesh(const std::string& filePath, smtk::mesh::CollectionPtr collection) const
{
smtk::extension::vtk::io::ExportVTKData export_;
smtk::extension::vtk::io::mesh::ExportVTKData export_;
return export_(filePath, collection, "");
}
}
}
}
}
}
void smtk_extension_vtk_io_MeshIOVTK_AutoInit_Construct()
void smtk_extension_vtk_io_mesh_MeshIOVTK_AutoInit_Construct()
{
smtk::io::ImportMesh::SupportedIOTypes().push_back(
smtk::io::mesh::MeshIOPtr(new smtk::extension::vtk::io::MeshIOVTK()));
smtk::io::mesh::MeshIOPtr(new smtk::extension::vtk::io::mesh::MeshIOVTK()));
smtk::io::ExportMesh::SupportedIOTypes().push_back(
smtk::io::mesh::MeshIOPtr(new smtk::extension::vtk::io::MeshIOVTK()));
smtk::io::mesh::MeshIOPtr(new smtk::extension::vtk::io::mesh::MeshIOVTK()));
}
void smtk_extension_vtk_io_MeshIOVTK_AutoInit_Destruct()
void smtk_extension_vtk_io_mesh_MeshIOVTK_AutoInit_Destruct()
{
}
smtkComponentInitMacro(smtk_extension_vtk_io_MeshIOVTK);
smtkComponentInitMacro(smtk_extension_vtk_io_mesh_MeshIOVTK);
......@@ -31,6 +31,8 @@ namespace vtk
{
namespace io
{
namespace mesh
{
class SMTKIOVTK_EXPORT MeshIOVTK : public smtk::io::mesh::MeshIO
{
......@@ -55,8 +57,9 @@ public:
}
}
}
}
void SMTKIOVTK_EXPORT smtk_extension_vtk_io_MeshIOVTK_AutoInit_Construct();
void SMTKIOVTK_EXPORT smtk_extension_vtk_io_MeshIOVTK_AutoInit_Destruct();
void SMTKIOVTK_EXPORT smtk_extension_vtk_io_mesh_MeshIOVTK_AutoInit_Construct();
void SMTKIOVTK_EXPORT smtk_extension_vtk_io_mesh_MeshIOVTK_AutoInit_Destruct();
#endif
......@@ -8,25 +8,25 @@
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#ifndef pybind_smtk_extension_vtk_io_ExportVTKData_h
#define pybind_smtk_extension_vtk_io_ExportVTKData_h
#ifndef pybind_smtk_extension_vtk_io_mesh_ExportVTKData_h
#define pybind_smtk_extension_vtk_io_mesh_ExportVTKData_h
#include <pybind11/pybind11.h>
#include "smtk/extension/vtk/io/ExportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ExportVTKData.h"
namespace py = pybind11;
py::class_< smtk::extension::vtk::io::ExportVTKData > pybind11_init_smtk_extension_vtk_io_ExportVTKData(py::module &m)
py::class_< smtk::extension::vtk::io::mesh::ExportVTKData > pybind11_init_smtk_extension_vtk_io_mesh_ExportVTKData(py::module &m)
{
py::class_< smtk::extension::vtk::io::ExportVTKData > instance(m, "ExportVTKData");
py::class_< smtk::extension::vtk::io::mesh::ExportVTKData > instance(m, "ExportVTKData");
instance
.def(py::init<>())
.def("__call__", (bool (smtk::extension::vtk::io::ExportVTKData::*)(::std::string const &, ::smtk::mesh::CollectionPtr, ::std::string) const) &smtk::extension::vtk::io::ExportVTKData::operator())
.def("__call__", (void (smtk::extension::vtk::io::ExportVTKData::*)(::smtk::mesh::MeshSet const &, ::vtkPolyData *, ::std::string) const) &smtk::extension::vtk::io::ExportVTKData::operator(), py::arg("meshSet"), py::arg("polydata"), py::arg("domain"))
.def("__call__", [&](const smtk::extension::vtk::io::ExportVTKData& exportData, ::smtk::mesh::MeshSet const & ms, ::vtkPolyData* pd){ return exportData(ms, pd); })
.def("__call__", (void (smtk::extension::vtk::io::ExportVTKData::*)(::smtk::mesh::MeshSet const &, ::vtkUnstructuredGrid *, ::std::string) const) &smtk::extension::vtk::io::ExportVTKData::operator())
.def("__call__", [&](const smtk::extension::vtk::io::ExportVTKData& exportData, ::smtk::mesh::MeshSet const & ms, ::vtkUnstructuredGrid* ug){ return exportData(ms, ug); })
.def("__call__", (bool (smtk::extension::vtk::io::mesh::ExportVTKData::*)(::std::string const &, ::smtk::mesh::CollectionPtr, ::std::string) const) &smtk::extension::vtk::io::mesh::ExportVTKData::operator())
.def("__call__", (void (smtk::extension::vtk::io::mesh::ExportVTKData::*)(::smtk::mesh::MeshSet const &, ::vtkPolyData *, ::std::string) const) &smtk::extension::vtk::io::mesh::ExportVTKData::operator(), py::arg("meshSet"), py::arg("polydata"), py::arg("domain"))
.def("__call__", [&](const smtk::extension::vtk::io::mesh::ExportVTKData& exportData, ::smtk::mesh::MeshSet const & ms, ::vtkPolyData* pd){ return exportData(ms, pd); })
.def("__call__", (void (smtk::extension::vtk::io::mesh::ExportVTKData::*)(::smtk::mesh::MeshSet const &, ::vtkUnstructuredGrid *, ::std::string) const) &smtk::extension::vtk::io::mesh::ExportVTKData::operator())
.def("__call__", [&](const smtk::extension::vtk::io::mesh::ExportVTKData& exportData, ::smtk::mesh::MeshSet const & ms, ::vtkUnstructuredGrid* ug){ return exportData(ms, ug); })
;
return instance;
}
......
......@@ -43,7 +43,7 @@ PYBIND11_MODULE(_smtkPybindIOVTK, io)
// The order of these function calls is important! It was determined by
// comparing the dependencies of each of the wrapped objects.
py::class_< smtk::extension::vtk::io::ExportVTKData > smtk_extension_vtk_io_ExportVTKData = pybind11_init_smtk_extension_vtk_io_ExportVTKData(io);
py::class_< smtk::extension::vtk::io::ImportVTKData > smtk_extension_vtk_io_ImportVTKData = pybind11_init_smtk_extension_vtk_io_ImportVTKData(io);
PySharedPtrClass< smtk::extension::vtk::io::MeshIOVTK, smtk::io::mesh::MeshIO > smtk_extension_vtk_io_MeshIOVTK = pybind11_init_smtk_extension_vtk_io_MeshIOVTK(io);
py::class_< smtk::extension::vtk::io::mesh::ExportVTKData > smtk_extension_vtk_io_mesh_ExportVTKData = pybind11_init_smtk_extension_vtk_io_mesh_ExportVTKData(io);
py::class_< smtk::extension::vtk::io::mesh::ImportVTKData > smtk_extension_vtk_io_mesh_ImportVTKData = pybind11_init_smtk_extension_vtk_io_mesh_ImportVTKData(io);
PySharedPtrClass< smtk::extension::vtk::io::mesh::MeshIOVTK, smtk::io::mesh::MeshIO > smtk_extension_vtk_io_mesh_MeshIOVTK = pybind11_init_smtk_extension_vtk_io_mesh_MeshIOVTK(io);
}
......@@ -8,32 +8,32 @@
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#ifndef pybind_smtk_extension_vtk_io_ImportVTKData_h
#define pybind_smtk_extension_vtk_io_ImportVTKData_h
#ifndef pybind_smtk_extension_vtk_io_mesh_ImportVTKData_h
#define pybind_smtk_extension_vtk_io_mesh_ImportVTKData_h
#include <pybind11/pybind11.h>
#include "smtk/extension/vtk/io/ImportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ImportVTKData.h"
#include "smtk/mesh/Collection.h"
#include "smtk/mesh/Manager.h"
namespace py = pybind11;
py::class_< smtk::extension::vtk::io::ImportVTKData > pybind11_init_smtk_extension_vtk_io_ImportVTKData(py::module &m)
py::class_< smtk::extension::vtk::io::mesh::ImportVTKData > pybind11_init_smtk_extension_vtk_io_mesh_ImportVTKData(py::module &m)
{
py::class_< smtk::extension::vtk::io::ImportVTKData > instance(m, "ImportVTKData");
py::class_< smtk::extension::vtk::io::mesh::ImportVTKData > instance(m, "ImportVTKData");
instance
.def(py::init<>())
.def("__call__", (smtk::mesh::CollectionPtr (smtk::extension::vtk::io::ImportVTKData::*)(::std::string const &, ::smtk::mesh::ManagerPtr &, ::std::string) const) &smtk::extension::vtk::io::ImportVTKData::operator())
.def("__call__", (bool (smtk::extension::vtk::io::ImportVTKData::*)(::std::string const &, ::smtk::mesh::CollectionPtr, ::std::string) const) &smtk::extension::vtk::io::ImportVTKData::operator())
.def("__call__", (smtk::mesh::MeshSet (smtk::extension::vtk::io::ImportVTKData::*)(::vtkPolyData *, ::smtk::mesh::CollectionPtr) const) &smtk::extension::vtk::io::ImportVTKData::operator())
.def("__call__", (bool (smtk::extension::vtk::io::ImportVTKData::*)(::vtkPolyData *, ::smtk::mesh::CollectionPtr, ::std::string) const) &smtk::extension::vtk::io::ImportVTKData::operator())
.def("__call__", (smtk::mesh::CollectionPtr (smtk::extension::vtk::io::ImportVTKData::*)(::vtkPolyData *, ::smtk::mesh::ManagerPtr &, ::std::string) const) &smtk::extension::vtk::io::ImportVTKData::operator())
.def("__call__", [&](const smtk::extension::vtk::io::ImportVTKData& importData, vtkPolyData *pd, ::smtk::mesh::ManagerPtr & manager){ return importData(pd, manager); })
.def("__call__", (bool (smtk::extension::vtk::io::ImportVTKData::*)(::vtkUnstructuredGrid *, ::smtk::mesh::CollectionPtr, ::std::string) const) &smtk::extension::vtk::io::ImportVTKData::operator())
.def("__call__", (smtk::mesh::CollectionPtr (smtk::extension::vtk::io::ImportVTKData::*)(::vtkUnstructuredGrid *, ::smtk::mesh::ManagerPtr &, ::std::string) const) &smtk::extension::vtk::io::ImportVTKData::operator())
.def("__call__", [&](const smtk::extension::vtk::io::ImportVTKData& importData, vtkUnstructuredGrid *ug, ::smtk::mesh::ManagerPtr & manager){ return importData(ug, manager); })
.def("__call__", (smtk::mesh::CollectionPtr (smtk::extension::vtk::io::mesh::ImportVTKData::*)(::std::string const &, ::smtk::mesh::ManagerPtr &, ::std::string) const) &smtk::extension::vtk::io::mesh::ImportVTKData::operator())
.def("__call__", (bool (smtk::extension::vtk::io::mesh::ImportVTKData::*)(::std::string const &, ::smtk::mesh::CollectionPtr, ::std::string) const) &smtk::extension::vtk::io::mesh::ImportVTKData::operator())
.def("__call__", (smtk::mesh::MeshSet (smtk::extension::vtk::io::mesh::ImportVTKData::*)(::vtkPolyData *, ::smtk::mesh::CollectionPtr) const) &smtk::extension::vtk::io::mesh::ImportVTKData::operator())
.def("__call__", (bool (smtk::extension::vtk::io::mesh::ImportVTKData::*)(::vtkPolyData *, ::smtk::mesh::CollectionPtr, ::std::string) const) &smtk::extension::vtk::io::mesh::ImportVTKData::operator())
.def("__call__", (smtk::mesh::CollectionPtr (smtk::extension::vtk::io::mesh::ImportVTKData::*)(::vtkPolyData *, ::smtk::mesh::ManagerPtr &, ::std::string) const) &smtk::extension::vtk::io::mesh::ImportVTKData::operator())
.def("__call__", [&](const smtk::extension::vtk::io::mesh::ImportVTKData& importData, vtkPolyData *pd, ::smtk::mesh::ManagerPtr & manager){ return importData(pd, manager); })
.def("__call__", (bool (smtk::extension::vtk::io::mesh::ImportVTKData::*)(::vtkUnstructuredGrid *, ::smtk::mesh::CollectionPtr, ::std::string) const) &smtk::extension::vtk::io::mesh::ImportVTKData::operator())
.def("__call__", (smtk::mesh::CollectionPtr (smtk::extension::vtk::io::mesh::ImportVTKData::*)(::vtkUnstructuredGrid *, ::smtk::mesh::ManagerPtr &, ::std::string) const) &smtk::extension::vtk::io::mesh::ImportVTKData::operator())
.def("__call__", [&](const smtk::extension::vtk::io::mesh::ImportVTKData& importData, vtkUnstructuredGrid *ug, ::smtk::mesh::ManagerPtr & manager){ return importData(ug, manager); })
;
return instance;
}
......
......@@ -8,27 +8,27 @@
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#ifndef pybind_smtk_extension_vtk_io_MeshIOVTK_h
#define pybind_smtk_extension_vtk_io_MeshIOVTK_h
#ifndef pybind_smtk_extension_vtk_io_mesh_MeshIOVTK_h
#define pybind_smtk_extension_vtk_io_mesh_MeshIOVTK_h
#include <pybind11/pybind11.h>
#include "smtk/extension/vtk/io/MeshIOVTK.h"
#include "smtk/extension/vtk/io/mesh/MeshIOVTK.h"
#include "smtk/io/mesh/MeshIO.h"
namespace py = pybind11;
PySharedPtrClass< smtk::extension::vtk::io::MeshIOVTK, smtk::io::mesh::MeshIO > pybind11_init_smtk_extension_vtk_io_MeshIOVTK(py::module &m)
PySharedPtrClass< smtk::extension::vtk::io::mesh::MeshIOVTK, smtk::io::mesh::MeshIO > pybind11_init_smtk_extension_vtk_io_mesh_MeshIOVTK(py::module &m)
{
PySharedPtrClass< smtk::extension::vtk::io::MeshIOVTK, smtk::io::mesh::MeshIO > instance(m, "MeshIOVTK");
PySharedPtrClass< smtk::extension::vtk::io::mesh::MeshIOVTK, smtk::io::mesh::MeshIO > instance(m, "MeshIOVTK");
instance
.def(py::init<>())
.def(py::init<::smtk::extension::vtk::io::MeshIOVTK const &>())
.def("deepcopy", (smtk::extension::vtk::io::MeshIOVTK & (smtk::extension::vtk::io::MeshIOVTK::*)(::smtk::extension::vtk::io::MeshIOVTK const &)) &smtk::extension::vtk::io::MeshIOVTK::operator=)
.def("importMesh", (smtk::mesh::CollectionPtr (smtk::extension::vtk::io::MeshIOVTK::*)(::std::string const &, ::smtk::mesh::ManagerPtr &, ::std::string const &) const) &smtk::extension::vtk::io::MeshIOVTK::importMesh, py::arg("filePath"), py::arg("manager"), py::arg("domainPropertyName"))
.def("importMesh", (bool (smtk::extension::vtk::io::MeshIOVTK::*)(::std::string const &, ::smtk::mesh::CollectionPtr, ::std::string const &) const) &smtk::extension::vtk::io::MeshIOVTK::importMesh, py::arg("filePath"), py::arg("collection"), py::arg("domainPropertyName"))
.def("exportMesh", &smtk::extension::vtk::io::MeshIOVTK::exportMesh, py::arg("filePath"), py::arg("collection"))
.def(py::init<::smtk::extension::vtk::io::mesh::MeshIOVTK const &>())
.def("deepcopy", (smtk::extension::vtk::io::mesh::MeshIOVTK & (smtk::extension::vtk::io::mesh::MeshIOVTK::*)(::smtk::extension::vtk::io::mesh::MeshIOVTK const &)) &smtk::extension::vtk::io::mesh::MeshIOVTK::operator=)
.def("importMesh", (smtk::mesh::CollectionPtr (smtk::extension::vtk::io::mesh::MeshIOVTK::*)(::std::string const &, ::smtk::mesh::ManagerPtr &, ::std::string const &) const) &smtk::extension::vtk::io::mesh::MeshIOVTK::importMesh, py::arg("filePath"), py::arg("manager"), py::arg("domainPropertyName"))
.def("importMesh", (bool (smtk::extension::vtk::io::mesh::MeshIOVTK::*)(::std::string const &, ::smtk::mesh::CollectionPtr, ::std::string const &) const) &smtk::extension::vtk::io::mesh::MeshIOVTK::importMesh, py::arg("filePath"), py::arg("collection"), py::arg("domainPropertyName"))
.def("exportMesh", &smtk::extension::vtk::io::mesh::MeshIOVTK::exportMesh, py::arg("filePath"), py::arg("collection"))
;
return instance;
}
......
......@@ -14,8 +14,8 @@
#include "smtk/attribute/MeshItem.h"
#include "smtk/attribute/StringItem.h"
#include "smtk/extension/vtk/io/ExportVTKData.h"
#include "smtk/extension/vtk/io/ImportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ExportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ImportVTKData.h"
#include "smtk/io/ImportMesh.h"
......@@ -167,7 +167,7 @@ int ImportExportMeshWithCellField(int argc, char* argv[])
SetCellField setCellField(euclideanDistance, distanceCellField);
smtk::mesh::for_each(mesh.cells(), setCellField);
smtk::extension::vtk::io::ExportVTKData exprt;
smtk::extension::vtk::io::mesh::ExportVTKData exprt;
vtkSmartPointer<vtkPolyData> pd = vtkSmartPointer<vtkPolyData>::New();
exprt(mesh, pd);
......@@ -184,7 +184,7 @@ int ImportExportMeshWithCellField(int argc, char* argv[])
cleanup(write_path);
smtk::extension::vtk::io::ImportVTKData imprt;
smtk::extension::vtk::io::mesh::ImportVTKData imprt;
smtk::mesh::ManagerPtr mngr = smtk::mesh::Manager::create();
smtk::mesh::CollectionPtr c = imprt(reader->GetOutput(), mngr);
smtk::mesh::MeshSet mesh = c->meshes();
......
......@@ -9,7 +9,7 @@
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#include "smtk/extension/vtk/io/ImportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ImportVTKData.h"
#include "smtk/io/ImportMesh.h"
#include "smtk/io/WriteMesh.h"
#include "smtk/mesh/Collection.h"
......@@ -303,7 +303,7 @@ template <typename vtkDataSetType>
smtk::mesh::CollectionPtr convert(
vtkDataSetType* input, smtk::mesh::ManagerPtr manager, std::string material)
{
smtk::extension::vtk::io::ImportVTKData imprt;
smtk::extension::vtk::io::mesh::ImportVTKData imprt;
//we convert the vtk data into a single mesh.
smtk::mesh::CollectionPtr collection = imprt(input, manager, material);
......
......@@ -10,7 +10,7 @@
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#include "smtk/extension/vtk/io/ImportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ImportVTKData.h"
#include "smtk/io/ImportMesh.h"
#include "smtk/io/WriteMesh.h"
#include "smtk/io/mesh/MeshIO.h"
......@@ -139,7 +139,7 @@ template <typename vtkDataSetType>
smtk::mesh::CollectionPtr convert(
vtkDataSetType* input, smtk::mesh::ManagerPtr manager, std::string material)
{
smtk::extension::vtk::io::ImportVTKData imprt;
smtk::extension::vtk::io::mesh::ImportVTKData imprt;
//we convert the vtk data into a single mesh.
smtk::mesh::CollectionPtr collection = imprt(input, manager, material);
......
......@@ -8,8 +8,8 @@
// PURPOSE. See the above copyright notice for more information.
//=========================================================================
#include "smtk/extension/vtk/io/ExportVTKData.h"
#include "smtk/extension/vtk/io/ImportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ExportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ImportVTKData.h"
#include "smtk/mesh/Collection.h"
#include "smtk/mesh/Manager.h"
#include "smtk/mesh/testing/cxx/helpers.h"
......@@ -144,7 +144,7 @@ void test_same_datasets(vtkDataSet* ds, vtkDataSet* ds2)
void verify_null_polydata()
{
smtk::mesh::ManagerPtr manager = smtk::mesh::Manager::create();
smtk::extension::vtk::io::ImportVTKData imprt;
smtk::extension::vtk::io::mesh::ImportVTKData imprt;
vtkPolyData* pd = NULL;
smtk::mesh::CollectionPtr c = imprt(pd, manager);
......@@ -154,7 +154,7 @@ void verify_null_polydata()
void verify_empty_polydata()
{
smtk::mesh::ManagerPtr manager = smtk::mesh::Manager::create();
smtk::extension::vtk::io::ImportVTKData imprt;
smtk::extension::vtk::io::mesh::ImportVTKData imprt;
smtk::mesh::CollectionPtr c = imprt(make_EmptyPolyData(), manager);
test(!c, "collection should invalid for empty poly data");
......@@ -163,7 +163,7 @@ void verify_empty_polydata()
void verify_tri_polydata()
{
smtk::mesh::ManagerPtr manager = smtk::mesh::Manager::create();
smtk::extension::vtk::io::ImportVTKData imprt;
smtk::extension::vtk::io::mesh::ImportVTKData imprt;
vtkSmartPointer<vtkPolyData> pd = make_TrianglePolyData();
smtk::mesh::CollectionPtr c = imprt(pd, manager);
......@@ -179,7 +179,7 @@ void verify_tri_polydata()
smtk::mesh::MeshSet meshes1d = c->meshes(smtk::mesh::Dims1);
test(meshes1d.size() == 0);
smtk::extension::vtk::io::ExportVTKData exprt;
smtk::extension::vtk::io::mesh::ExportVTKData exprt;
vtkSmartPointer<vtkPolyData> pd2 = vtkSmartPointer<vtkPolyData>::New();
exprt(meshes, pd2);
test_same_datasets(pd, pd2);
......@@ -188,7 +188,7 @@ void verify_tri_polydata()
void verify_tri_ugrid()
{
smtk::mesh::ManagerPtr manager = smtk::mesh::Manager::create();
smtk::extension::vtk::io::ImportVTKData imprt;
smtk::extension::vtk::io::mesh::ImportVTKData imprt;
vtkSmartPointer<vtkUnstructuredGrid> ug = make_TriangleUGrid();
smtk::mesh::CollectionPtr c = imprt(ug, manager);
......@@ -204,7 +204,7 @@ void verify_tri_ugrid()
smtk::mesh::MeshSet meshes1d = c->meshes(smtk::mesh::Dims1);
test(meshes1d.size() == 0);
smtk::extension::vtk::io::ExportVTKData exprt;
smtk::extension::vtk::io::mesh::ExportVTKData exprt;
vtkSmartPointer<vtkUnstructuredGrid> ug2 = vtkSmartPointer<vtkUnstructuredGrid>::New();
exprt(meshes, ug2);
test_same_datasets(ug, ug2);
......@@ -213,7 +213,7 @@ void verify_tri_ugrid()
void verify_mixed_cell_ugrid()
{
smtk::mesh::ManagerPtr manager = smtk::mesh::Manager::create();
smtk::extension::vtk::io::ImportVTKData imprt;
smtk::extension::vtk::io::mesh::ImportVTKData imprt;
vtkSmartPointer<vtkUnstructuredGrid> ug = make_MixedVolUGrid();
smtk::mesh::CollectionPtr c = imprt(ug, manager);
......@@ -231,7 +231,7 @@ void verify_mixed_cell_ugrid()
test(meshes.size() == 1);
test(meshes.cells() == c->cells());
smtk::extension::vtk::io::ExportVTKData exprt;
smtk::extension::vtk::io::mesh::ExportVTKData exprt;
vtkSmartPointer<vtkUnstructuredGrid> ug2 = vtkSmartPointer<vtkUnstructuredGrid>::New();
exprt(c->meshes(), ug2);
test_same_datasets(ug, ug2);
......
......@@ -55,4 +55,4 @@ int UnitTestMeshIOVTK(int argc, char* argv[])
}
// This macro ensures the vtk io library is loaded into the executable
smtkComponentInitMacro(smtk_extension_vtk_io_MeshIOVTK)
smtkComponentInitMacro(smtk_extension_vtk_io_mesh_MeshIOVTK)
......@@ -26,7 +26,7 @@
#include "smtk/mesh/DimensionTypes.h"
#include "smtk/mesh/Manager.h"
#include "smtk/extension/vtk/io/ExportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ExportVTKData.h"
#include "vtkCellArray.h"
#include "vtkCellData.h"
......@@ -228,7 +228,7 @@ void vtkMeshMultiBlockSource::GenerateRepresentationForSingleMesh(const smtk::me
toRender.append(oneD);
toRender.append(zeroD);
smtk::extension::vtk::io::ExportVTKData exportVTKData;
smtk::extension::vtk::io::mesh::ExportVTKData exportVTKData;
exportVTKData(toRender, pd);
this->GenerateNormals(pd, entityref, genNormals);
......
......@@ -15,7 +15,7 @@
#include "smtk/extension/vtk/filter/vtkImageSpacingFlip.h"
#include "smtk/extension/vtk/io/ExportVTKData.h"
#include "smtk/extension/vtk/io/mesh/ExportVTKData.h"
#include "smtk/mesh/MeshSet.h"
......@@ -451,7 +451,7 @@ vtkSmartPointer<vtkPolyData> vtkModelMultiBlockSource::GenerateRepresentationFro
{
return pd;
}
smtk::extension::vtk::io::ExportVTKData exportVTKData;
smtk::extension::vtk::io::mesh::ExportVTKData exportVTKData;
exportVTKData(entity.meshTessellation(), pd);
// Only create the color array if there is a valid default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment