STIR  6.3.0
write_data_1d.h
Go to the documentation of this file.
1 #ifndef __stir_IO_write_data_1d_H__
2 #define __stir_IO_write_data_1d_H__
3 
11 /*
12  Copyright (C) 2004- 2009, Hammersmith Imanet Ltd
13  Copyright (C) 2024, University College London
14  This file is part of STIR.
15 
16  SPDX-License-Identifier: Apache-2.0
17 
18  See STIR/LICENSE.txt for details
19 */
20 #include "stir/ArrayFwd.h"
21 #include <stdio.h>
22 #include <iostream>
23 
24 START_NAMESPACE_STIR
25 class Succeeded;
26 class ByteOrder;
27 
28 namespace detail
29 {
37 template <int num_dimensions, class elemT>
38 inline Succeeded
39 write_data_1d(std::ostream& s, const Array<num_dimensions, elemT>& data, const ByteOrder byte_order, const bool can_corrupt_data);
47 template <int num_dimensions, class elemT>
48 inline Succeeded write_data_1d(FILE*& fptr_ref,
49  const ArrayType<num_dimensions, elemT>& data,
50  const ByteOrder byte_order,
51  const bool can_corrupt_data);
52 } // namespace detail
53 
54 END_NAMESPACE_STIR
55 
57 
58 #endif
forward declaration of stir::Array class for multi-dimensional (numeric) arrays
Converts a string literal into a format string that will be parsed at compile time and converted into...
Definition: args.h:20
Implementation of stir::write_data_1d() functions.
Succeeded write_data_1d(FILE *&fptr_ref, const ArrayType< num_dimensions, elemT > &data, const ByteOrder byte_order, const bool can_corrupt_data)
This is an internal function called by write_data(). It does the actual writing to FILE* using stdio ...