fileout.h 1.17 KB
#ifndef FILE_OUTPUT_H
#define FILE_OUTPUT_H

#include <string>
//#include "defaults.h"
#include "dataTypes.h"

#include "colormap.h"
#include "fieldslice.h"
#include "nearfield.h"
#include "microscope.h"
#include "rts/cuda_handle_error.h"

struct fileoutStruct{

	//output file names
	std::string nearFile;		//near field filename
	std::string farFile;		//far field filename
	std::string intFile;		//detector intensity filename
	std::string absFile;        //detector absorbance filename
	std::string transFile;      //detector transmission filename

	//output type
	enum field_type {fieldMag, fieldIntensity, fieldAbsorbance, fieldPolar, fieldImag, fieldReal, fieldAngularSpectrum};
	enum image_source {imageNearField, imageObjective, imageDetector, imageExtendedSource};

	field_type field;

	//image_source source;

	//color map info
	rts::colormap::colormapType colormap;
	ptype colorMax;


	void Save(microscopeStruct* scope);
	void Simulate(microscopeStruct* scope);

	private:
	bool is_binary(std::string filename);
	void saveNearField(nearfieldStruct* nf);
	void saveFarField(microscopeStruct* scope);
	void saveDetector(microscopeStruct* scope);


};

#endif