RMF
Toggle main menu visibility
utility.h
Go to the documentation of this file.
1
/**
2
* \file RMF/utility.h
3
* \brief Helper functions for manipulating RMF files.
4
*
5
* Copyright 2007-2022 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef RMF_UTILITY_H
10
#define RMF_UTILITY_H
11
12
#include "
NodeConstHandle.h
"
13
#include "RMF/config.h"
14
#include "RMF/internal/errors.h"
15
#include "
Vector.h
"
16
#include <array>
17
18
RMF_ENABLE_WARNINGS
19
20
namespace
RMF
{
21
22
class
FileConstHandle
;
23
class
FileHandle
;
24
class
NodeConstHandle
;
25
class
NodeHandle
;
26
27
/** \name Copy functions
28
29
See the example cloning.py for a usage example.
30
31
@{
32
*/
33
34
/** Copy the hierarchy structure and set structure from one RMF
35
file to another.*/
36
RMFEXPORT
void
clone_file_info
(
FileConstHandle
input,
FileHandle
output);
37
38
/** Copy the hierarchy structure and set structure from one RMF
39
file to another.*/
40
RMFEXPORT
void
clone_hierarchy
(
FileConstHandle
input,
FileHandle
output);
41
42
/** Copy the data of a single frame from between two files.*/
43
RMFEXPORT
void
clone_loaded_frame
(
FileConstHandle
input,
FileHandle
output);
44
45
/** Copy the data of a single frame from between two files. Parts missing
46
in the output file will be skipped.*/
47
RMFEXPORT
void
clone_static_frame
(
FileConstHandle
input,
FileHandle
output);
48
/** @} */
49
50
/** Return true of the two have the same structure.*/
51
RMFEXPORT
bool
get_equal_structure
(
FileConstHandle
input,
52
FileConstHandle
output,
53
bool
print_diff =
false
);
54
/** Return true of the two have the same values in the current frame.*/
55
RMFEXPORT
bool
get_equal_current_values
(
FileConstHandle
input,
56
FileConstHandle
out);
57
58
/** Return true if the two have the same values in the static frame.*/
59
RMFEXPORT
bool
get_equal_static_values
(
FileConstHandle
input,
60
FileConstHandle
out);
61
62
/** This function simply throws an exception. It is here for testing.*/
63
RMFEXPORT
void
test_throw_exception
();
64
65
/** Return a lower bound/upper bound pair that bounds the data stored in the
66
* tree.
67
*/
68
RMFEXPORT std::array<RMF::Vector3, 2>
get_bounding_box
(
NodeConstHandle
root);
69
70
/** Return the diameter of the system. Unlike bounding box, this one can
71
be called from python. */
72
RMFEXPORT
float
get_diameter
(
NodeConstHandle
root);
73
74
}
/* namespace RMF */
75
76
RMF_DISABLE_WARNINGS
77
78
#endif
/* RMF_UTILITY_H */
NodeConstHandle.h
Declaration of NodeConstHandle.
Vector.h
Represent coordinates.
RMF::FileConstHandle
A handle for a read-only RMF file.
Definition
FileConstHandle.h:78
RMF::FileHandle
A handle for an RMF file.
Definition
FileHandle.h:54
RMF::NodeConstHandle
A handle for a particular node in a read-only hierarchy.
Definition
NodeConstHandle.h:86
RMF::NodeHandle
A handle for a particular node in the hierarchy.
Definition
NodeHandle.h:60
RMF
The namespace for all functionality in the library.
Definition
BufferConstHandle.h:21
RMF::test_throw_exception
void test_throw_exception()
RMF::clone_loaded_frame
void clone_loaded_frame(FileConstHandle input, FileHandle output)
RMF::clone_static_frame
void clone_static_frame(FileConstHandle input, FileHandle output)
RMF::get_bounding_box
std::array< RMF::Vector3, 2 > get_bounding_box(NodeConstHandle root)
RMF::get_diameter
float get_diameter(NodeConstHandle root)
RMF::get_equal_static_values
bool get_equal_static_values(FileConstHandle input, FileConstHandle out)
RMF::get_equal_current_values
bool get_equal_current_values(FileConstHandle input, FileConstHandle out)
RMF::clone_hierarchy
void clone_hierarchy(FileConstHandle input, FileHandle output)
RMF::get_equal_structure
bool get_equal_structure(FileConstHandle input, FileConstHandle output, bool print_diff=false)
RMF::clone_file_info
void clone_file_info(FileConstHandle input, FileHandle output)