IMP logo
IMP Reference Guide  2.13.0
The Integrative Modeling Platform
algebra/io.h
Go to the documentation of this file.
1 /**
2  * \file IMP/algebra/io.h
3  * \brief Classes to write entities in algebra to files.
4  *
5  * Copyright 2007-2020 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPALGEBRA_IO_H
10 #define IMPALGEBRA_IO_H
11 
12 #include "Vector3D.h"
13 #include "Sphere3D.h"
14 #include <IMP/file.h>
15 
16 IMPALGEBRA_BEGIN_NAMESPACE
17 
18 /** @name Simple geometric IO
19  These functions write geometry to text files, one line per
20  geometric primitive. Each line has the form \quote{x y z} for points or
21  \quote{x y z r} for spheres. We can easily add general dimension support
22  if requested..
23  Lines beginning with "#" are treated as comments.
24 
25  @{
26  */
27 //! Write a set of 3D vectors to a file
28 /** \see read_pts
29  \see VectorD
30 */
31 IMPALGEBRAEXPORT void write_pts(const Vector3Ds &vs, TextOutput out);
32 
33 //! Read a set of 3D vectors from a file
34 /** \see write_pts
35  \see VectorD
36 */
37 IMPALGEBRAEXPORT Vector3Ds read_pts(TextInput input);
38 
39 //! Write a set of 3D spheres to a file
40 /** \see read_pts
41  \see SphereD
42 */
43 IMPALGEBRAEXPORT void write_spheres(const Sphere3Ds &vs, TextOutput out);
44 
45 //! Read a set of 3D spheres from a file
46 /** \see write_pts
47  \see SphereD
48 */
49 IMPALGEBRAEXPORT Sphere3Ds read_spheres(TextInput input);
50 
51 /** @} */
52 
53 IMPALGEBRA_END_NAMESPACE
54 
55 #endif /* IMPALGEBRA_IO_H */
void write_pts(const Vector3Ds &vs, TextOutput out)
Write a set of 3D vectors to a file.
Vector< VectorD< 3 > > Vector3Ds
Definition: VectorD.h:423
Handling of file input/output.
Vector3Ds read_pts(TextInput input)
Read a set of 3D vectors from a file.
Sphere3Ds read_spheres(TextInput input)
Read a set of 3D spheres from a file.
IMP::Vector< Sphere3D > Sphere3Ds
Definition: SphereD.h:96
Simple 3D vector class.
void write_spheres(const Sphere3Ds &vs, TextOutput out)
Write a set of 3D spheres to a file.
Simple 3D sphere class.