anatomist  5.1.2
3D neuroimaging data viewer
anatomist::AObjectPalette Class Reference

#include <anatomist/color/objectPalette.h>

Collaboration diagram for anatomist::AObjectPalette:

Public Types

enum  Palette1DMapping { FIRSTLINE , DIAGONAL }
 
typedef AimsRGBA(* MixMethod) (const carto::Volume< AimsRGBA > &map1, const carto::Volume< AimsRGBA > *map2, unsigned x, unsigned y, const AObjectPalette &pal)
 

Public Member Functions

 AObjectPalette (carto::rc_ptr< APalette > pal)
 
 AObjectPalette (const AObjectPalette &x)
 
virtual ~AObjectPalette ()
 
virtual AObjectPaletteclone () const
 
virtual AObjectPaletteoperator= (const AObjectPalette &x)
 
carto::rc_ptr< APaletterefPalette () const
 
carto::rc_ptr< APaletterefPalette2 () const
 
void setRefPalette (carto::rc_ptr< APalette > pal)
 
void setRefPalette2 (carto::rc_ptr< APalette > pal)
 
const carto::Volume< AimsRGBA > * colors () const
 
carto::Volume< AimsRGBA > * colors ()
 
void create (unsigned dimx, unsigned dimy=1, unsigned dimz=1, unsigned dimt=1)
 
virtual void fill ()
 
float min1 () const
 
float max1 () const
 
float min2 () const
 
float max2 () const
 
int palette1DMapping () const
 
std::string palette1DMappingName () const
 
void setMin1 (float x)
 
void setMax1 (float x)
 
void setMin2 (float x)
 
void setMax2 (float x)
 
void setPalette1DMapping (Palette1DMapping palette1DMapping)
 
void setPalette1DMappingName (std::string palette1DMappingName)
 
std::string mixMethodName () const
 
void setMixMethod (const std::string &name)
 
float linearMixFactor () const
 
void setLinearMixFactor (float x)
 
bool is2dMode () const
 
void set2dMode (bool x)
 
bool isTransparent () const
 
AimsRGBA normColor (float x, float y=0) const
 
AimsRGBA normColor (const Point2df &pos) const
 
bool zeroCenteredAxis1 () const
 
bool zeroCenteredAxis2 () const
 
void setZeroCenteredAxis1 (bool x)
 
void setZeroCenteredAxis2 (bool x)
 
bool set (const carto::GenericObject &)
 
carto::Object genericDescription () const
 
int maxSizeX () const
 Maximum size of the internal palette image. More...
 
int maxSizeY () const
 
void setMaxSize (int maxsizex, int maxsizey)
 
int glMaxSizeX () const
 Maximum size of the OpenGL palette image, after scaling. More...
 
int glMaxSizeY () const
 
void glSetMaxSize (int glmaxsizex, int glmaxsizey)
 
void clearColors ()
 
void copyColors (const AObjectPalette &pal)
 if pal colors size is compatible, just copy it More...
 
void copyOrFillColors (const AObjectPalette &pal)
 if pal colors size is compatible, just copy it; otherwise call fill() More...
 
QImage * toQImage (int w=0, int h=0) const
 

Static Public Member Functions

static AimsRGBA palette2DMixMethod (const carto::Volume< AimsRGBA > &map1, const carto::Volume< AimsRGBA > *map2, unsigned x, unsigned y, const AObjectPalette &pal)
 
static AimsRGBA linearMixMethod (const carto::Volume< AimsRGBA > &map1, const carto::Volume< AimsRGBA > *map2, unsigned x, unsigned y, const AObjectPalette &pal)
 
static AimsRGBA geometricMixMethod (const carto::Volume< AimsRGBA > &map1, const carto::Volume< AimsRGBA > *map2, unsigned x, unsigned y, const AObjectPalette &pal)
 

Static Public Attributes

static std::map< std::string, MixMethodmixMethods
 

Static Protected Member Functions

static std::map< std::string, MixMethoddefaultMixMethods ()
 

Protected Attributes

carto::rc_ptr< APalette_refPal
 
carto::VolumeRef< AimsRGBA_colors
 
float _min
 
float _max
 
carto::rc_ptr< APalette_refPal2
 
float _min2
 
float _max2
 
MixMethod _mixMethod
 
std::string _mixMethodName
 
float _linMixFactor
 
Palette1DMapping _palette1DMapping
 
bool _mode2d
 
bool _transp
 
int _maxSizeX
 
int _maxSizeY
 
int _glMaxSizeX
 
int _glMaxSizeY
 
bool _zeroCentered1
 
bool _zeroCentered2
 

Detailed Description

Definition at line 48 of file objectPalette.h.

Member Typedef Documentation

◆ MixMethod

typedef AimsRGBA(* anatomist::AObjectPalette::MixMethod) (const carto::Volume< AimsRGBA > &map1, const carto::Volume< AimsRGBA > *map2, unsigned x, unsigned y, const AObjectPalette &pal)

Definition at line 57 of file objectPalette.h.

Member Enumeration Documentation

◆ Palette1DMapping

Enumerator
FIRSTLINE 
DIAGONAL 

Definition at line 51 of file objectPalette.h.

Constructor & Destructor Documentation

◆ AObjectPalette() [1/2]

anatomist::AObjectPalette::AObjectPalette ( carto::rc_ptr< APalette pal)

◆ AObjectPalette() [2/2]

anatomist::AObjectPalette::AObjectPalette ( const AObjectPalette x)

◆ ~AObjectPalette()

virtual anatomist::AObjectPalette::~AObjectPalette ( )
virtual

Member Function Documentation

◆ clearColors()

void anatomist::AObjectPalette::clearColors ( )

Referenced by setRefPalette().

◆ clone()

virtual AObjectPalette* anatomist::AObjectPalette::clone ( ) const
virtual

◆ colors() [1/2]

carto::Volume<AimsRGBA>* anatomist::AObjectPalette::colors ( )
inline

Definition at line 79 of file objectPalette.h.

References _colors, and fill().

◆ colors() [2/2]

const carto::Volume<AimsRGBA>* anatomist::AObjectPalette::colors ( ) const
inline

Definition at line 76 of file objectPalette.h.

References _colors, and fill().

◆ copyColors()

void anatomist::AObjectPalette::copyColors ( const AObjectPalette pal)

if pal colors size is compatible, just copy it

◆ copyOrFillColors()

void anatomist::AObjectPalette::copyOrFillColors ( const AObjectPalette pal)

if pal colors size is compatible, just copy it; otherwise call fill()

◆ create()

void anatomist::AObjectPalette::create ( unsigned  dimx,
unsigned  dimy = 1,
unsigned  dimz = 1,
unsigned  dimt = 1 
)

◆ defaultMixMethods()

static std::map<std::string, MixMethod> anatomist::AObjectPalette::defaultMixMethods ( )
staticprotected

◆ fill()

virtual void anatomist::AObjectPalette::fill ( )
virtual

Referenced by colors().

◆ genericDescription()

carto::Object anatomist::AObjectPalette::genericDescription ( ) const

◆ geometricMixMethod()

static AimsRGBA anatomist::AObjectPalette::geometricMixMethod ( const carto::Volume< AimsRGBA > &  map1,
const carto::Volume< AimsRGBA > *  map2,
unsigned  x,
unsigned  y,
const AObjectPalette pal 
)
static

◆ glMaxSizeX()

int anatomist::AObjectPalette::glMaxSizeX ( ) const
inline

Maximum size of the OpenGL palette image, after scaling.

0 means unused: no GL palette image is needed. -1 means no limit: may grow as large as the reference palette image -2 means unchanged

Definition at line 143 of file objectPalette.h.

References _glMaxSizeX.

◆ glMaxSizeY()

int anatomist::AObjectPalette::glMaxSizeY ( ) const
inline

Definition at line 144 of file objectPalette.h.

References _glMaxSizeY.

◆ glSetMaxSize()

void anatomist::AObjectPalette::glSetMaxSize ( int  glmaxsizex,
int  glmaxsizey 
)

◆ is2dMode()

bool anatomist::AObjectPalette::is2dMode ( ) const
inline

Definition at line 106 of file objectPalette.h.

References _mode2d.

◆ isTransparent()

bool anatomist::AObjectPalette::isTransparent ( ) const
inline

Definition at line 108 of file objectPalette.h.

References _transp.

◆ linearMixFactor()

float anatomist::AObjectPalette::linearMixFactor ( ) const
inline

Definition at line 104 of file objectPalette.h.

References _linMixFactor.

◆ linearMixMethod()

static AimsRGBA anatomist::AObjectPalette::linearMixMethod ( const carto::Volume< AimsRGBA > &  map1,
const carto::Volume< AimsRGBA > *  map2,
unsigned  x,
unsigned  y,
const AObjectPalette pal 
)
static

◆ max1()

float anatomist::AObjectPalette::max1 ( ) const
inline

Definition at line 85 of file objectPalette.h.

References _max.

◆ max2()

float anatomist::AObjectPalette::max2 ( ) const
inline

Definition at line 87 of file objectPalette.h.

References _max2.

◆ maxSizeX()

int anatomist::AObjectPalette::maxSizeX ( ) const
inline

Maximum size of the internal palette image.

0 means unused: no palette image is needed. -1 means no limit: may grow as large as the reference palette image -2 means unchanged

Definition at line 135 of file objectPalette.h.

References _maxSizeX.

◆ maxSizeY()

int anatomist::AObjectPalette::maxSizeY ( ) const
inline

Definition at line 136 of file objectPalette.h.

References _maxSizeY.

◆ min1()

float anatomist::AObjectPalette::min1 ( ) const
inline

Definition at line 84 of file objectPalette.h.

References _min.

◆ min2()

float anatomist::AObjectPalette::min2 ( ) const
inline

Definition at line 86 of file objectPalette.h.

References _min2.

◆ mixMethodName()

std::string anatomist::AObjectPalette::mixMethodName ( ) const
inline

Definition at line 102 of file objectPalette.h.

References _mixMethodName.

◆ normColor() [1/2]

AimsRGBA anatomist::AObjectPalette::normColor ( const Point2df pos) const

◆ normColor() [2/2]

AimsRGBA anatomist::AObjectPalette::normColor ( float  x,
float  y = 0 
) const

◆ operator=()

virtual AObjectPalette& anatomist::AObjectPalette::operator= ( const AObjectPalette x)
virtual

◆ palette1DMapping()

int anatomist::AObjectPalette::palette1DMapping ( ) const
inline

Definition at line 88 of file objectPalette.h.

References _palette1DMapping.

Referenced by setPalette1DMapping().

◆ palette1DMappingName()

std::string anatomist::AObjectPalette::palette1DMappingName ( ) const
inline

Definition at line 89 of file objectPalette.h.

References _palette1DMapping.

Referenced by setPalette1DMappingName().

◆ palette2DMixMethod()

static AimsRGBA anatomist::AObjectPalette::palette2DMixMethod ( const carto::Volume< AimsRGBA > &  map1,
const carto::Volume< AimsRGBA > *  map2,
unsigned  x,
unsigned  y,
const AObjectPalette pal 
)
static

◆ refPalette()

carto::rc_ptr<APalette> anatomist::AObjectPalette::refPalette ( ) const
inline

Definition at line 71 of file objectPalette.h.

References _refPal.

◆ refPalette2()

carto::rc_ptr<APalette> anatomist::AObjectPalette::refPalette2 ( ) const
inline

Definition at line 72 of file objectPalette.h.

References _refPal2.

◆ set()

bool anatomist::AObjectPalette::set ( const carto::GenericObject )

◆ set2dMode()

void anatomist::AObjectPalette::set2dMode ( bool  x)
inline

Definition at line 107 of file objectPalette.h.

References _mode2d.

◆ setLinearMixFactor()

void anatomist::AObjectPalette::setLinearMixFactor ( float  x)
inline

Definition at line 105 of file objectPalette.h.

References _linMixFactor.

◆ setMax1()

void anatomist::AObjectPalette::setMax1 ( float  x)
inline

Definition at line 93 of file objectPalette.h.

References _max.

◆ setMax2()

void anatomist::AObjectPalette::setMax2 ( float  x)
inline

Definition at line 96 of file objectPalette.h.

References _max2.

◆ setMaxSize()

void anatomist::AObjectPalette::setMaxSize ( int  maxsizex,
int  maxsizey 
)

◆ setMin1()

void anatomist::AObjectPalette::setMin1 ( float  x)
inline

Definition at line 91 of file objectPalette.h.

References _min.

◆ setMin2()

void anatomist::AObjectPalette::setMin2 ( float  x)
inline

Definition at line 95 of file objectPalette.h.

References _min2.

◆ setMixMethod()

void anatomist::AObjectPalette::setMixMethod ( const std::string &  name)

◆ setPalette1DMapping()

void anatomist::AObjectPalette::setPalette1DMapping ( Palette1DMapping  palette1DMapping)
inline

Definition at line 97 of file objectPalette.h.

References _palette1DMapping, and palette1DMapping().

◆ setPalette1DMappingName()

void anatomist::AObjectPalette::setPalette1DMappingName ( std::string  palette1DMappingName)
inline

Definition at line 99 of file objectPalette.h.

References _palette1DMapping, DIAGONAL, FIRSTLINE, and palette1DMappingName().

◆ setRefPalette()

void anatomist::AObjectPalette::setRefPalette ( carto::rc_ptr< APalette pal)
inline

Definition at line 73 of file objectPalette.h.

References _refPal, and clearColors().

◆ setRefPalette2()

void anatomist::AObjectPalette::setRefPalette2 ( carto::rc_ptr< APalette pal)
inline

Definition at line 75 of file objectPalette.h.

References _refPal2.

◆ setZeroCenteredAxis1()

void anatomist::AObjectPalette::setZeroCenteredAxis1 ( bool  x)
inline

Definition at line 113 of file objectPalette.h.

References _zeroCentered1.

◆ setZeroCenteredAxis2()

void anatomist::AObjectPalette::setZeroCenteredAxis2 ( bool  x)
inline

Definition at line 114 of file objectPalette.h.

References _zeroCentered2.

◆ toQImage()

QImage* anatomist::AObjectPalette::toQImage ( int  w = 0,
int  h = 0 
) const

◆ zeroCenteredAxis1()

bool anatomist::AObjectPalette::zeroCenteredAxis1 ( ) const
inline

Definition at line 111 of file objectPalette.h.

References _zeroCentered1.

◆ zeroCenteredAxis2()

bool anatomist::AObjectPalette::zeroCenteredAxis2 ( ) const
inline

Definition at line 112 of file objectPalette.h.

References _zeroCentered2.

Member Data Documentation

◆ _colors

carto::VolumeRef<AimsRGBA> anatomist::AObjectPalette::_colors
protected

Definition at line 159 of file objectPalette.h.

Referenced by colors().

◆ _glMaxSizeX

int anatomist::AObjectPalette::_glMaxSizeX
protected

Definition at line 173 of file objectPalette.h.

Referenced by glMaxSizeX().

◆ _glMaxSizeY

int anatomist::AObjectPalette::_glMaxSizeY
protected

Definition at line 174 of file objectPalette.h.

Referenced by glMaxSizeY().

◆ _linMixFactor

float anatomist::AObjectPalette::_linMixFactor
protected

Definition at line 167 of file objectPalette.h.

Referenced by linearMixFactor(), and setLinearMixFactor().

◆ _max

float anatomist::AObjectPalette::_max
protected

Definition at line 161 of file objectPalette.h.

Referenced by max1(), and setMax1().

◆ _max2

float anatomist::AObjectPalette::_max2
protected

Definition at line 164 of file objectPalette.h.

Referenced by max2(), and setMax2().

◆ _maxSizeX

int anatomist::AObjectPalette::_maxSizeX
protected

Definition at line 171 of file objectPalette.h.

Referenced by maxSizeX().

◆ _maxSizeY

int anatomist::AObjectPalette::_maxSizeY
protected

Definition at line 172 of file objectPalette.h.

Referenced by maxSizeY().

◆ _min

float anatomist::AObjectPalette::_min
protected

Definition at line 160 of file objectPalette.h.

Referenced by min1(), and setMin1().

◆ _min2

float anatomist::AObjectPalette::_min2
protected

Definition at line 163 of file objectPalette.h.

Referenced by min2(), and setMin2().

◆ _mixMethod

MixMethod anatomist::AObjectPalette::_mixMethod
protected

Definition at line 165 of file objectPalette.h.

◆ _mixMethodName

std::string anatomist::AObjectPalette::_mixMethodName
protected

Definition at line 166 of file objectPalette.h.

Referenced by mixMethodName().

◆ _mode2d

bool anatomist::AObjectPalette::_mode2d
protected

Definition at line 169 of file objectPalette.h.

Referenced by is2dMode(), and set2dMode().

◆ _palette1DMapping

Palette1DMapping anatomist::AObjectPalette::_palette1DMapping
protected

◆ _refPal

carto::rc_ptr<APalette> anatomist::AObjectPalette::_refPal
protected

Definition at line 158 of file objectPalette.h.

Referenced by refPalette(), and setRefPalette().

◆ _refPal2

carto::rc_ptr<APalette> anatomist::AObjectPalette::_refPal2
protected

Definition at line 162 of file objectPalette.h.

Referenced by refPalette2(), and setRefPalette2().

◆ _transp

bool anatomist::AObjectPalette::_transp
protected

Definition at line 170 of file objectPalette.h.

Referenced by isTransparent().

◆ _zeroCentered1

bool anatomist::AObjectPalette::_zeroCentered1
protected

Definition at line 175 of file objectPalette.h.

Referenced by setZeroCenteredAxis1(), and zeroCenteredAxis1().

◆ _zeroCentered2

bool anatomist::AObjectPalette::_zeroCentered2
protected

Definition at line 176 of file objectPalette.h.

Referenced by setZeroCenteredAxis2(), and zeroCenteredAxis2().

◆ mixMethods

std::map<std::string, MixMethod> anatomist::AObjectPalette::mixMethods
static

Definition at line 152 of file objectPalette.h.


The documentation for this class was generated from the following file: