EMAN2
Public Member Functions | Private Attributes
EMAN::ColorRGBGenerator Class Reference

Class to encapsulate an RGB color generator for marching cubes isosurface generator For now you can only color by radius, but in the near future you will be able to color by map, etc. More...

#include <marchingcubes.h>

Collaboration diagram for EMAN::ColorRGBGenerator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ColorRGBGenerator ()
 ColorRGBGenerator (EMData *emdata)
 Constructor.
float * getRGBColor (int x, int y, int z)
 Generate a color based on pixel coords.
void set_data (EMData *data)
 set the emdata
void generateRadialColorMap ()
 Generate a color map.
void set_cmap_data (EMData *data)
 Set min max data.
void setOrigin (int orix, int oriy, int oriz)
 Set origin.
void setScale (float i, float o)
 Set scaling.
void setRGBmode (int mode)
 Set RGB mode 0 = none, 1 = color by radius, more to come :)
void setMinMax (float min, float max)
 Set the mn max for cmap coloring.
int getRGBmode ()
 Return RGB mode.
bool getNeedToRecolor ()
 Lets us know if we need to recalclate colors.
void setNeedToRecolor (bool recolor)

Private Attributes

int rgbmode
int originx
int originy
int originz
float inner
float outer
float minimum
float maximum
bool needtorecolor
float * colormap
EMDataem_data
EMDatacmap
float rgb [3]

Detailed Description

Class to encapsulate an RGB color generator for marching cubes isosurface generator For now you can only color by radius, but in the near future you will be able to color by map, etc.

Definition at line 192 of file marchingcubes.h.


Constructor & Destructor Documentation

EMAN::ColorRGBGenerator::ColorRGBGenerator ( )
EMAN::ColorRGBGenerator::ColorRGBGenerator ( EMData emdata)

Constructor.


Member Function Documentation

void EMAN::ColorRGBGenerator::generateRadialColorMap ( )

Generate a color map.

bool EMAN::ColorRGBGenerator::getNeedToRecolor ( ) [inline]

Lets us know if we need to recalclate colors.

Definition at line 247 of file marchingcubes.h.

References needtorecolor.

                {
                        return needtorecolor;
                }
float* EMAN::ColorRGBGenerator::getRGBColor ( int  x,
int  y,
int  z 
)

Generate a color based on pixel coords.

int EMAN::ColorRGBGenerator::getRGBmode ( ) [inline]

Return RGB mode.

Definition at line 241 of file marchingcubes.h.

References rgbmode.

Referenced by EMAN::MarchingCubes::getRGBmode().

                {
                        return rgbmode;
                }
void EMAN::ColorRGBGenerator::set_cmap_data ( EMData data)

Set min max data.

Referenced by EMAN::MarchingCubes::setCmapData().

void EMAN::ColorRGBGenerator::set_data ( EMData data)

set the emdata

void EMAN::ColorRGBGenerator::setMinMax ( float  min,
float  max 
) [inline]

Set the mn max for cmap coloring.

Definition at line 233 of file marchingcubes.h.

References max, maximum, min, minimum, and needtorecolor.

Referenced by EMAN::MarchingCubes::setCmapMinMax().

                {
                        minimum = min;
                        maximum = max;
                        needtorecolor = true;
                }
void EMAN::ColorRGBGenerator::setNeedToRecolor ( bool  recolor) [inline]

Definition at line 252 of file marchingcubes.h.

References needtorecolor.

                {
                        needtorecolor = recolor;
                }
void EMAN::ColorRGBGenerator::setOrigin ( int  orix,
int  oriy,
int  oriz 
) [inline]

Set origin.

Definition at line 211 of file marchingcubes.h.

References needtorecolor, originx, originy, and originz.

Referenced by EMAN::MarchingCubes::setRGBorigin().

                {
                        originx = orix;
                        originy = oriy;
                        originz = oriz;
                        needtorecolor = true;
                }
void EMAN::ColorRGBGenerator::setRGBmode ( int  mode) [inline]

Set RGB mode 0 = none, 1 = color by radius, more to come :)

Definition at line 226 of file marchingcubes.h.

References needtorecolor, and rgbmode.

Referenced by EMAN::MarchingCubes::setRGBmode().

                {
                        rgbmode = mode;
                        needtorecolor = true;
                }
void EMAN::ColorRGBGenerator::setScale ( float  i,
float  o 
) [inline]

Set scaling.

Definition at line 219 of file marchingcubes.h.

References inner, needtorecolor, and outer.

Referenced by EMAN::MarchingCubes::setRGBscale().

                {
                        inner = i;
                        outer = o;
                        needtorecolor = true;
                }

Member Data Documentation

Definition at line 270 of file marchingcubes.h.

Definition at line 268 of file marchingcubes.h.

Definition at line 269 of file marchingcubes.h.

Definition at line 261 of file marchingcubes.h.

Referenced by setScale().

Definition at line 264 of file marchingcubes.h.

Referenced by setMinMax().

Definition at line 263 of file marchingcubes.h.

Referenced by setMinMax().

Definition at line 258 of file marchingcubes.h.

Referenced by setOrigin().

Definition at line 259 of file marchingcubes.h.

Referenced by setOrigin().

Definition at line 260 of file marchingcubes.h.

Referenced by setOrigin().

Definition at line 262 of file marchingcubes.h.

Referenced by setScale().

float EMAN::ColorRGBGenerator::rgb[3] [private]

Definition at line 272 of file marchingcubes.h.

Definition at line 257 of file marchingcubes.h.

Referenced by getRGBmode(), and setRGBmode().


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