IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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-2022 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
16IMPALGEBRA_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*/
31IMPALGEBRAEXPORT 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*/
37IMPALGEBRAEXPORT Vector3Ds read_pts(TextInput input);
38
39//! Write a set of 3D spheres to a file
40/** \see read_pts
41 \see SphereD
42*/
43IMPALGEBRAEXPORT 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*/
49IMPALGEBRAEXPORT Sphere3Ds read_spheres(TextInput input);
50
51/** @} */
52
53IMPALGEBRA_END_NAMESPACE
54
55#endif /* IMPALGEBRA_IO_H */
Simple 3D sphere class.
Simple 3D vector class.
Handling of file input/output.
void write_spheres(const Sphere3Ds &vs, TextOutput out)
Write a set of 3D spheres to a file.
IMP::Vector< Sphere3D > Sphere3Ds
Definition SphereD.h:103
void write_pts(const Vector3Ds &vs, TextOutput out)
Write a set of 3D vectors to a file.
Sphere3Ds read_spheres(TextInput input)
Read a set of 3D spheres from a file.
Vector3Ds read_pts(TextInput input)
Read a set of 3D vectors from a file.
Vector< VectorD< 3 > > Vector3Ds
Definition VectorD.h:409