svFSIplus
vtk_xml_parser.h
1 /**
2  * Copyright (c) Stanford University, The Regents of the University of California, and others.
3  *
4  * All Rights Reserved.
5  *
6  * See Copyright-SimVascular.txt for additional details.
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining
9  * a copy of this software and associated documentation files (the
10  * "Software"), to deal in the Software without restriction, including
11  * without limitation the rights to use, copy, modify, merge, publish,
12  * distribute, sublicense, and/or sell copies of the Software, and to
13  * permit persons to whom the Software is furnished to do so, subject
14  * to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
23  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #include "ComMod.h"
33 
34 #ifndef VTK_XML_PARSER
35 #define VTK_XML_PARSER
36 
37 namespace vtk_xml_parser {
38 
39 enum class VtkFileFormat {
40  VTP,
41  VTU
42 };
43 
45  public:
46  const static std::string VTK_VTU_EXTENSION;
47  const static std::string VTK_VTP_EXTENSION;
48 };
49 
50 void load_fiber_direction_vtu(const std::string& file_name, const std::string& data_name, const int idx,
51  const int nsd, mshType& mesh);
52 
53 void load_vtp(const std::string& file_name, faceType& face);
54 
55 void load_vtp(const std::string& file_name, mshType& mesh);
56 
57 void load_vtu(const std::string& file_name, mshType& mesh);
58 
59 };
60 
61 #endif
62 
63 
The face type containing mesh at boundary.
Definition: ComMod.h:501
This is the container for a mesh or NURBS patch, those specific to NURBS are noted.
Definition: ComMod.h:788
Definition: vtk_xml_parser.h:44
Definition: mesh.cpp:52
Definition: vtk_xml_parser.cpp:56
void load_fiber_direction_vtu(const std::string &file_name, const std::string &data_name, const int idx, const int nsd, mshType &mesh)
Read fiber direction data from a VTK VTU file and copy it into a mesh..
Definition: vtk_xml_parser.cpp:467
void load_vtp(const std::string &file_name, faceType &face)
Store a surface mesh read from a VTK .vtp file into a Face object.
Definition: vtk_xml_parser.cpp:523
void load_vtu(const std::string &file_name, mshType &mesh)
Read a mesh from a .vtu file.
Definition: vtk_xml_parser.cpp:617