anatomist  5.1.2
3D neuroimaging data viewer
cSetObjectPalette.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 
35 #ifndef ANA_COMMANDS_CSETOBJECTPALETTE_H
36 #define ANA_COMMANDS_CSETOBJECTPALETTE_H
37 
39 #include <set>
40 
41 
42 namespace anatomist
43 {
44 
45  class AObject;
46 
47 
51  {
52  public:
53  SetObjectPaletteCommand( const std::set<AObject *> &,
54  const std::string & palname1,
55  bool min1flg = false, float min1 = 0,
56  bool max1flg = false, float max1 = 1,
57  const std::string & palname2 = "",
58  bool min2flg = false,
59  float min2 = 0, bool max2flg = false,
60  float max2 = 1,
61  const std::string & mixMethod = "",
62  bool mixFacflg = false,
63  float linMixFactor = 0.5,
64  const std::string & pal1Dmapping = "",
65  bool absmode = false, int sizex = -2,
66  int sizey = -2, bool zeroc1flg = false,
67  bool zeroc1 = false, bool zeroc2flg = false,
68  bool zeroc2 = false );
70 
71  virtual std::string name() const { return( "SetObjectPalette" ); }
72  virtual void write( Tree & com, Serializer* ser ) const;
73 
74  protected:
75  virtual void doit();
76 
77  private:
78  std::set<AObject *> _objL;
79  std::string _pal1;
80  std::string _pal2;
81  std::string _pal1Dmapping ;
82  float _min1;
83  float _max1;
84  float _min2;
85  float _max2;
86  std::string _mixMethod;
87  float _linMixFactor;
88  bool _min1flg;
89  bool _max1flg;
90  bool _min2flg;
91  bool _max2flg;
92  bool _mixFacFlg;
93  bool _absmode;
94  int _sizex;
95  int _sizey;
96  bool _zeroc1flg;
97  bool _zeroc1;
98  bool _zeroc2flg;
99  bool _zeroc2;
100 
101  friend class StdModule;
102  static Command* read( const Tree & com, CommandContext* context );
103  static bool initSyntax();
104  };
105 
106 }
107 
108 
109 #endif
The abstract base class for commands.
Definition: Command.h:60
The abstract base class for usual commands.
Definition: Command.h:104
Serializer is a helper class for pointer serialization.
Definition: Serializer.h:55
Set an AObjectPalette to objects.
SetObjectPaletteCommand(const std::set< AObject * > &, const std::string &palname1, bool min1flg=false, float min1=0, bool max1flg=false, float max1=1, const std::string &palname2="", bool min2flg=false, float min2=0, bool max2flg=false, float max2=1, const std::string &mixMethod="", bool mixFacflg=false, float linMixFactor=0.5, const std::string &pal1Dmapping="", bool absmode=false, int sizex=-2, int sizey=-2, bool zeroc1flg=false, bool zeroc1=false, bool zeroc2flg=false, bool zeroc2=false)
virtual void write(Tree &com, Serializer *ser) const
Print the guts of a command into a Tree given as parent.
virtual void doit()
Do a command.
virtual std::string name() const
Return the unique name of a class of commands.
Context for commands processor readers (APipeReader etc)
Definition: context.h:48