OpenLB 1.7
Loading...
Searching...
No Matches
blockGifWriter.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2015 Albert Mink, Mathias J. Krause
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
24#ifndef BLOCK_GIF_WRITER_H
25#define BLOCK_GIF_WRITER_H
26
27#include <iomanip>
28#include "io/colormaps.h"
29#include "io/ostreamManager.h"
31
32
33namespace olb {
34
47template< typename T >
49public:
50 // constructor
51 BlockGifWriter( std::string const& map="leeloo" );
52
58 void write( BlockF2D<T>& f, T minValue, T maxValue, int iT=0,
59 std::string const& name="emptyName" );
61 void write( BlockF2D<T>& f, int iT=0, std::string const& name="emptyName" );
63 void write(int iT=0);
65 void addFunctor( BlockF2D<T>& f, std::string const& name="emptyName" );
66 void addFunctor( BlockF2D<T>& f, T minValue, T maxValue, std::string const& name="emptyName" );
67
68private:
69 // void ppm2gif(const std::string& fullNamePpm, const std::string& fullNameGif);
70 mutable OstreamManager clout;
71 int _colorRange; // set to 1024
72 int _numColors; // set to 1024
73 graphics::ColorMap<T> _colorMap;
74
76 std::vector< BlockF2D<T>* > _pointerVec;
78 std::vector<std::string> _name;
80 std::vector<bool> _autoScale;
82 std::vector<T> _minValue;
84 std::vector<T> _maxValue;
85};
86
87
88} // namespace olb
89
90#endif
represents all functors that operate on a cuboid in general, mother class of BlockLatticeF,...
BlockGifWriter writes given functor data to image file of format .ppm.
void write(BlockF2D< T > &f, T minValue, T maxValue, int iT=0, std::string const &name="emptyName")
writes functor values normed to interval [0,1].
void addFunctor(BlockF2D< T > &f, std::string const &name="emptyName")
put functor to _pointerVec, to simplify writing process of several functors
BlockGifWriter(std::string const &map="leeloo")
class for marking output with some text
Top level namespace for all of OpenLB.