scalarslice.h 695 Bytes
#ifndef RTS_SCALAR_SLICE
#define RTS_SCALAR_SLICE

#include "dataTypes.h"
#include "rts/visualization/colormap.h"

struct scalarslice
{
	//gpu pointer to the scalar slice
	ptype* S;

	//resolution of the slice
	int R[2];

    scalarslice();
	scalarslice(int x, int y);
	~scalarslice();
	void clear();

	void toImage(std::string filename, ptype vmin, ptype vmax, rts::colormapType cmap = rts::cmBrewer);
	void toImage(std::string filename, bool positive = true, rts::colormapType cmap = rts::cmBrewer);
	void toEnvi(std::string filename, ptype wavelength = 0, bool append = false);

	//assignment operator
	scalarslice & operator= (const scalarslice & rhs);

};



#endif