IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
geometry_io.h
Go to the documentation of this file.
1/**
2 * \file IMP/rmf/geometry_io.h
3 * \brief Handle read/write of geometry data from/to files.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 *
7 */
8
9#ifndef IMPRMF_GEOMETRY_IO_H
10#define IMPRMF_GEOMETRY_IO_H
11
12#include <IMP/rmf/rmf_config.h>
14#include <RMF/NodeHandle.h>
15#include <RMF/FileHandle.h>
16
17IMPRMF_BEGIN_NAMESPACE
18
19/** \name Geometry I/O
20
21 The geometry I/O support currently handles geometry composed of
22 - IMP::display::SegmentGeometry
23 - IMP::display::CylinderGeometry
24 - IMP::display::SphereGeometry
25
26 Other types can be supported when requested. Be aware, many
27 more complex geometry types are automatically decomposed into
28 the above types and are so, more or less, supported.
29 @{
30 */
31//! Add geometries to the file.
32IMPRMFEXPORT void add_geometries(RMF::FileHandle file,
34
35//! Add geometries to a given parent node.
36IMPRMFEXPORT void add_geometries(RMF::NodeHandle parent,
38
39//! Add geometries, assuming they do not move between frames.
40/** This can be space saving compared to resaving
41 the constant position each frame. */
42IMPRMFEXPORT void add_static_geometries(RMF::FileHandle parent,
44
45//! Add a single geometry to the file.
46IMPRMFEXPORT void add_geometry(RMF::FileHandle file, display::Geometry *r);
47
48//! Create geometry objects for the geometry nodes found in the file.
49IMPRMFEXPORT display::Geometries create_geometries(RMF::FileConstHandle parent);
50
51//! Link the passed geometry objects to corresponding ones in the file.
52/** \note The geometries must be in the same order;
53 we don't search around for matches.
54 */
55IMPRMFEXPORT void link_geometries(RMF::FileConstHandle parent,
57/** @} */
58
59IMPRMF_END_NAMESPACE
60
61#endif /* IMPRMF_GEOMETRY_IO_H */
The base class for geometry.
Implement geometry for the basic shapes from IMP.algebra.
IMP::Vector< IMP::WeakPointer< Geometry > > GeometriesTemp
IMP::Vector< IMP::Pointer< Geometry > > Geometries
void add_static_geometries(RMF::FileHandle parent, const display::GeometriesTemp &r)
Add geometries, assuming they do not move between frames.
void add_geometries(RMF::FileHandle file, const display::GeometriesTemp &r)
Add geometries to the file.
void link_geometries(RMF::FileConstHandle parent, const display::GeometriesTemp &r)
Link the passed geometry objects to corresponding ones in the file.
void add_geometry(RMF::FileHandle file, display::Geometry *r)
Add a single geometry to the file.
display::Geometries create_geometries(RMF::FileConstHandle parent)
Create geometry objects for the geometry nodes found in the file.