data_storage.h 1.05 KB
Newer Older
1 2
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions

3
   Copyright (C) 2013, 2014, 2015, 2016 Inria
4 5 6 7 8 9 10 11 12 13 14

   This file is part of ALTA.

   This Source Code Form is subject to the terms of the Mozilla Public
   License, v. 2.0.  If a copy of the MPL was not distributed with this
   file, You can obtain one at http://mozilla.org/MPL/2.0/.  */

#pragma once

#include <iostream>
#include "data.h"
15
#include "vertical_segment.h"
16
#include "common.h"
17
#include "args.h"
18

19 20
namespace alta
{
Romain Pacanowski's avatar
Romain Pacanowski committed
21 22
    // Write DATA to OUT in ALTA's text format.
    void save_data_as_text(std::ostream& out, const alta::data &data);
23

Romain Pacanowski's avatar
Romain Pacanowski committed
24 25
    // Write DATA to OUT in a compact binary format.
    void save_data_as_binary(std::ostream& out, const alta::data& data);
26

27

28 29 30 31 32 33
    // Return the data read from INPUT in ALTA's native text format.
    data* load_data_from_text(std::istream& input,
                              const alta::arguments& header);

    // Return the data read from the binary-formatted stream IN.
    data* load_data_from_binary(std::istream& in, const alta::arguments& header);
34
}
35