00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef IMAGETRANSFORMCOLORS_H
00016 #define IMAGETRANSFORMCOLORS_H
00017
00018 #include "pandatoolbase.h"
00019 #include "programBase.h"
00020 #include "pvector.h"
00021 #include "filename.h"
00022 #include "luse.h"
00023
00024 class PNMImage;
00025
00026
00027
00028
00029
00030
00031 class ImageTransformColors : public ProgramBase {
00032 public:
00033 ImageTransformColors();
00034
00035 void run();
00036
00037 protected:
00038 static bool dispatch_mat4(const string &opt, const string &arg, void *var);
00039 static bool dispatch_mat3(const string &opt, const string &arg, void *var);
00040 static bool dispatch_range(const string &opt, const string &arg, void *var);
00041 static bool dispatch_scale(const string &opt, const string &arg, void *var);
00042 static bool dispatch_add(const string &opt, const string &arg, void *var);
00043
00044 virtual bool handle_args(Args &args);
00045 Filename get_output_filename(const Filename &source_filename) const;
00046
00047 void process_image(PNMImage &image);
00048
00049 private:
00050 bool _hls;
00051 LMatrix4d _mat;
00052
00053 bool _got_output_filename;
00054 Filename _output_filename;
00055 bool _got_output_dirname;
00056 Filename _output_dirname;
00057 bool _inplace;
00058
00059 typedef pvector<Filename> Filenames;
00060 Filenames _filenames;
00061 };
00062
00063 #include "imageTransformColors.I"
00064
00065 #endif
00066