data.h 1.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions

   Copyright (C) 2013, 2014 Inria

   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/.  */

Laurent Belcour's avatar
Laurent Belcour committed
11 12 13 14 15 16
#pragma once

#include <core/data.h>
#include <core/common.h>
#include <core/args.h>

Laurent Belcour's avatar
Laurent Belcour committed
17
class data_merl : public data
Laurent Belcour's avatar
Laurent Belcour committed
18 19 20
{
	public: // methods

21
        data_merl();
22

Laurent Belcour's avatar
Laurent Belcour committed
23 24 25
		// Load data from a file
		virtual void load(const std::string& filename) ;
		virtual void load(const std::string& filename, const arguments& args) ;
26 27
		
		virtual void save(const std::string& filename) const ;
Laurent Belcour's avatar
Laurent Belcour committed
28 29

		// Acces to data
30 31
		virtual vec get(int i) const;
		virtual vec operator[](int i) const;
32

33
      virtual vec value(const vec& in) const;
34 35
		
		// Set data
36 37
		virtual void set(int i, const vec& x);
		virtual void set(const vec& x);
Laurent Belcour's avatar
Laurent Belcour committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52

		// Get data size, e.g. the number of samples to fit
		virtual int size() const ;

		// Get min and max input space values
		virtual vec min() const ;
		virtual vec max() const ;

		virtual int dimX() const ; 
		virtual int dimY() const ; 

	private: // data
		double *brdf ;

} ;