1 #ifndef IMAGE_PARSER_HPP 2 #define IMAGE_PARSER_HPP 4 #include "executable.hpp" 24 typedef STD_TR1::shared_ptr<abstract_image_parser> ref;
25 typedef STD_TR1::shared_ptr<const abstract_image_parser> const_ref;
32 const std::string& file_id);
50 virtual void process_image_( MPI_Comm comm,
52 const std::string&) = 0;
71 STD_TR1::shared_ptr< std::list< STD_TR1::shared_ptr<abstract_image_parser> > >
75 void process_image_( MPI_Comm comm,
80 virtual std::unique_ptr<Bild> altered_image_(
const Bild& ) = 0;
86 virtual const char* filename_addition_()
const = 0;
89 virtual void init_manipulator_() = 0;
108 double x_min, x_max, y_min, y_max;
110 const char* name()
const {
return "crop_image";};
112 const char* filename_addition_()
const {
return "cropped";};
114 std::unique_ptr<Bild> altered_image_(
const Bild& );
116 void init_manipulator_();
135 const char* name()
const {
return "blur_image";};
137 const char* filename_addition_()
const {
return "blured";};
139 std::unique_ptr<Bild> altered_image_(
const Bild& );
141 void init_manipulator_();
172 void erase_rectangular(
Bild& fb);
173 void erase_circular(
Bild& fb);
174 void renorm_image(
Bild& fb);
176 const char* name()
const {
return "erase_border_image";};
178 const char* filename_addition_()
const {
return "erasedborder";};
180 std::unique_ptr<Bild> altered_image_(
const Bild& );
182 void init_manipulator_();
202 const char* name()
const {
return "PPR_image";};
204 virtual void process_image_( MPI_Comm,
225 const char* name()
const {
return "spread_image";};
227 virtual void process_image_( MPI_Comm,
251 const char* name()
const {
return "ascii_image";};
254 void process_image_( MPI_Comm,
256 const std::string& filen );
258 bool check_state_id(
const Bild& b);
284 const Bild& get_current_image()
const;
286 void reset_current_image();
288 void synchronize_threads(MPI_Comm);
290 size_t count()
const {
return c;};
292 typedef STD_TR1::shared_ptr<sum_image_processor> ref;
293 typedef STD_TR1::shared_ptr<const sum_image_processor> const_ref;
296 std::vector<complex>::iterator start;
297 std::vector<complex>::iterator end;
299 std::vector<complex> coeffs;
305 std::unique_ptr<Bild> data;
307 const char* name()
const {
return "sum_images";};
311 void process_image_( MPI_Comm,
313 const std::string& filen );
330 sum_image_processor::ref sip;
333 STD_TR1::shared_ptr< std::list< abstract_image_parser::ref > >
337 const char* name()
const {
return "sum_image_writer";};
342 void reinit_param(
const std::string& param_name);
344 void perform_(MPI_Comm comm);
346 void post_process_(MPI_Comm comm);
360 const Bild& get_current_image()
const;
362 void reset_current_image();
364 size_t count()
const {
return c;};
366 typedef STD_TR1::shared_ptr<subtract_image_processor> ref;
367 typedef STD_TR1::shared_ptr<const subtract_image_processor> const_ref;
370 std::vector<complex>::iterator start;
371 std::vector<complex>::iterator end;
379 std::unique_ptr<Bild>
final;
381 const char* name()
const {
return "subtract_images";};
385 void process_image_( MPI_Comm,
387 const std::string& filen );
396 subtract_image_processor::ref sip;
398 STD_TR1::shared_ptr< std::list< STD_TR1::shared_ptr< abstract_image_parser> > >
401 const char* name()
const {
return "subtract_image_writer";};
406 void reinit_param(
const std::string& param_name);
408 void perform_(MPI_Comm comm);
410 void post_process_(MPI_Comm);
438 const char* name()
const {
return "average_image";};
441 void process_image_( MPI_Comm,
443 const std::string& filen );
445 void make_x_cut(std::ofstream& ofs,
446 const Bild& b)
const;
447 void make_y_cut(std::ofstream& ofs,
448 const Bild& b)
const;
472 const char* name()
const {
return "cut_image";};
475 void process_image_( MPI_Comm,
477 const std::string& filen );
479 void make_x_cut(std::ofstream& ofs,
480 const Bild& b)
const;
481 void make_y_cut(std::ofstream& ofs,
482 const Bild& b)
const;
501 const char* name()
const {
return "current_image";};
504 void process_image_( MPI_Comm,
506 const std::string& filen );
516 const char* name()
const {
return "corrogation_image";};
519 void process_image_( MPI_Comm,
521 const std::string& filen );
531 const char* name()
const {
return "correlation_image";};
534 void correlate(
int,
int, complex*,
const Bild&)
const;
536 void process_image_( MPI_Comm,
538 const std::string& filen );
545 const Bild& get_image(
size_t i)
const;
549 void synchronize_threads(MPI_Comm);
551 size_t count()
const {
return size;};
553 typedef STD_TR1::shared_ptr<collect_image_processor> ref;
554 typedef STD_TR1::shared_ptr<const collect_image_processor> const_ref;
555 typedef std::vector< STD_TR1::shared_ptr<Bild> >::iterator iterator;
557 iterator begin(){
return data.begin();}
558 iterator end() {
return data.end(); }
563 std::vector< STD_TR1::shared_ptr<Bild> > data;
565 const char* name()
const {
return "collect_images";};
568 void process_image_( MPI_Comm,
570 const std::string& filen );
579 std::vector<double> normalizations;
582 const char * name()
const {
return "normalize_image_by_maximum";};
583 void init_manipulator_();
584 std::unique_ptr<Bild> altered_image_(
const Bild& b );
585 const char* filename_addition_()
const {
return "maxnorm";};
600 collect_image_processor::ref targets;
601 collect_image_processor::ref basis;
602 collect_image_processor::ref biorthogonal_basis;
603 std::vector< std::vector<complex> > coefficients;
607 const char* name()
const {
return "project_images";};
610 void reinit_param(
const std::string& param_name);
611 void perform_(MPI_Comm comm);
612 void post_process_(MPI_Comm comm);
Manipulator to erase Border.
Definition: image_parser.hpp:161
Definition: image_parser.hpp:541
Executable Object to output images collected by a sum_image_processor sum_image_writer will forward t...
Definition: image_parser.hpp:324
Definition: image_parser.hpp:573
Processor to cut through wavefunction.
Definition: image_parser.hpp:462
Definition: image_parser.hpp:390
Processor for autocorrogation of wavefunction.
Definition: image_parser.hpp:511
class to turn a complex value into a color
Definition: write_jpg.hpp:60
Class to contain wave-function image data.
Definition: generate_wavefunction.hpp:25
Base clase for Processors that change the image, and then call actuall processors.
Definition: image_parser.hpp:66
Abstract base class to process calculated wavefunctions.
Definition: image_parser.hpp:21
Processor to subtract wavefunctions.
Definition: image_parser.hpp:356
Manipulator to blur an image, useful when rendering graphene.
Definition: image_parser.hpp:127
Processor to sum up identical wavefunctions sum_image_processor will store an image internally...
Definition: image_parser.hpp:280
An abstract base class supporting xml_file_reading of input parameters.
Definition: input_file.hpp:79
Processor for current of wavefunction - will be mostly zero for eigenstates of closed systems at zero...
Definition: image_parser.hpp:494
Average out one spatial dimension in the image.
Definition: image_parser.hpp:426
Processor to calculate PPR.
Definition: image_parser.hpp:193
Class to project wavefunctions on a basis.
Definition: image_parser.hpp:595
Processor for autocorrelation of wavefunction.
Definition: image_parser.hpp:525
Processor to calculate spread.
Definition: image_parser.hpp:216
Definition: executable.hpp:16
Processor to output image as gnuplotable text.
Definition: image_parser.hpp:242
void process_image(MPI_Comm comm, const Bild &b, const std::string &file_id)
Process the image in Bild, use file_id as part of the output name.
Definition: image_parser.cpp:17
Manipulator to crop an image, useful when one wants to further process.
Definition: image_parser.hpp:102