IMP  2.2.1
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-2014 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/base/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, base::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(base::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, base::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(base::TextInput input);
50 
51 /** @} */
52 
53 IMPALGEBRA_END_NAMESPACE
54 
55 #endif /* IMPALGEBRA_IO_H */
IMP::base::Vector< Sphere3D > Sphere3Ds
Definition: SphereD.h:89
base::Vector< VectorD< 3 > > Vector3Ds
Definition: VectorD.h:397
void write_pts(const Vector3Ds &vs, base::TextOutput out)
Write a set of 3D vectors to a file.
Vector3Ds read_pts(base::TextInput input)
Read a set of 3D vectors from a file.
void write_spheres(const Sphere3Ds &vs, base::TextOutput out)
Write a set of 3d spheres to a file.
Sphere3Ds read_spheres(base::TextInput input)
Read a set of 3d spheres from a file.
Simple 3D vector class.
Handling of file input/output.
Simple 3D sphere class.