Fluid Dynamics Library
pngexporter.h
Go to the documentation of this file.
00001 
00022 #ifndef __FDL_PNG_EXPORTER_H
00023 #define __FDL_PNG_EXPORTER_H
00024 
00025 #include <string>
00026 
00027 #include "core/grid.hpp"
00028 #include "logger/logger.h"
00029 #include "io/exporterbase.h"
00030 
00031 namespace fdl {
00032         
00033 class PngExporter : public ExporterBase {
00034 public:
00035         PngExporter(std::string prefix="density_export_");
00036         ~PngExporter();
00037         // virtual void write(const fdl::Grid& grid);
00038         static int writePNG(const char* filename, unsigned char** rowsp, int w, int h);
00039         
00040 private:        
00041         virtual void write();
00042         
00043         void exportDensity(int counter, std::string prefix, float* field, int xRes, int yRes, int zRes);
00044 
00045 };
00046 
00047 }       // namespace fdl
00048 
00049 #endif  // __FDL_PNG_EXPORTER_H