35 #ifndef ANA_COLOR_OBJECTPALETTE_H
36 #define ANA_COLOR_OBJECTPALETTE_H
60 unsigned x,
unsigned y,
81 void create(
unsigned dimx,
unsigned dimy = 1,
unsigned dimz = 1,
92 {
_min = x;
if( isnan( x ) || isinf( x ) )
_min = 0; }
94 {
_max = x;
if( isnan( x ) || isinf( x ) )
_max = 0; }
118 unsigned x,
unsigned y,
122 unsigned x,
unsigned y,
126 unsigned x,
unsigned y,
carto::rc_ptr< APalette > _refPal2
int palette1DMapping() const
bool zeroCenteredAxis2() const
int glMaxSizeX() const
Maximum size of the OpenGL palette image, after scaling.
void create(unsigned dimx, unsigned dimy=1, unsigned dimz=1, unsigned dimt=1)
AObjectPalette(const AObjectPalette &x)
void setMaxSize(int maxsizex, int maxsizey)
void setLinearMixFactor(float x)
bool set(const carto::GenericObject &)
static AimsRGBA linearMixMethod(const carto::Volume< AimsRGBA > &map1, const carto::Volume< AimsRGBA > *map2, unsigned x, unsigned y, const AObjectPalette &pal)
carto::rc_ptr< APalette > refPalette2() const
virtual AObjectPalette * clone() const
Palette1DMapping _palette1DMapping
void setRefPalette2(carto::rc_ptr< APalette > pal)
QImage * toQImage(int w=0, int h=0) const
void setZeroCenteredAxis1(bool x)
static std::map< std::string, MixMethod > mixMethods
bool isTransparent() const
bool zeroCenteredAxis1() const
virtual ~AObjectPalette()
carto::rc_ptr< APalette > refPalette() const
void setPalette1DMapping(Palette1DMapping palette1DMapping)
std::string palette1DMappingName() const
void copyColors(const AObjectPalette &pal)
if pal colors size is compatible, just copy it
AObjectPalette(carto::rc_ptr< APalette > pal)
void setPalette1DMappingName(std::string palette1DMappingName)
AimsRGBA normColor(float x, float y=0) const
carto::VolumeRef< AimsRGBA > _colors
const carto::Volume< AimsRGBA > * colors() const
void glSetMaxSize(int glmaxsizex, int glmaxsizey)
static std::map< std::string, MixMethod > defaultMixMethods()
static AimsRGBA geometricMixMethod(const carto::Volume< AimsRGBA > &map1, const carto::Volume< AimsRGBA > *map2, unsigned x, unsigned y, const AObjectPalette &pal)
int maxSizeX() const
Maximum size of the internal palette image.
void copyOrFillColors(const AObjectPalette &pal)
if pal colors size is compatible, just copy it; otherwise call fill()
carto::Object genericDescription() const
AimsRGBA normColor(const Point2df &pos) const
std::string _mixMethodName
float linearMixFactor() const
carto::Volume< AimsRGBA > * colors()
AimsRGBA(* MixMethod)(const carto::Volume< AimsRGBA > &map1, const carto::Volume< AimsRGBA > *map2, unsigned x, unsigned y, const AObjectPalette &pal)
std::string mixMethodName() const
void setMixMethod(const std::string &name)
virtual AObjectPalette & operator=(const AObjectPalette &x)
carto::rc_ptr< APalette > _refPal
void setZeroCenteredAxis2(bool x)
static AimsRGBA palette2DMixMethod(const carto::Volume< AimsRGBA > &map1, const carto::Volume< AimsRGBA > *map2, unsigned x, unsigned y, const AObjectPalette &pal)
void setRefPalette(carto::rc_ptr< APalette > pal)