EMAN2
Public Member Functions | Private Attributes | List of all members
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]

Public Member Functions

 ColorRGBGenerator ()
 
 ColorRGBGenerator (EMData *emdata)
 Constructor. More...
 
float * getRGBColor (int x, int y, int z)
 Generate a color based on pixel coords. More...
 
void set_data (EMData *data)
 set the emdata More...
 
void generateRadialColorMap ()
 Generate a color map. More...
 
void set_cmap_data (EMData *data)
 Set min max data. More...
 
void setOrigin (int orix, int oriy, int oriz)
 Set origin. More...
 
void setScale (float i, float o)
 Set scaling. More...
 
void setRGBmode (int mode)
 Set RGB mode 0 = none, 1 = color by radius, more to come :) More...
 
void setMinMax (float min, float max)
 Set the mn max for cmap coloring. More...
 
int getRGBmode ()
 Return RGB mode. More...
 
bool getNeedToRecolor ()
 Lets us know if we need to recalculate colors. More...
 
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 188 of file marchingcubes.h.

Constructor & Destructor Documentation

◆ ColorRGBGenerator() [1/2]

EMAN::ColorRGBGenerator::ColorRGBGenerator ( )

◆ ColorRGBGenerator() [2/2]

EMAN::ColorRGBGenerator::ColorRGBGenerator ( EMData emdata)

Constructor.

Member Function Documentation

◆ generateRadialColorMap()

void EMAN::ColorRGBGenerator::generateRadialColorMap ( )

Generate a color map.

◆ getNeedToRecolor()

bool EMAN::ColorRGBGenerator::getNeedToRecolor ( )
inline

Lets us know if we need to recalculate colors.

Definition at line 243 of file marchingcubes.h.

244 {
245 return needtorecolor;
246 }

References needtorecolor.

◆ getRGBColor()

float * EMAN::ColorRGBGenerator::getRGBColor ( int  x,
int  y,
int  z 
)

Generate a color based on pixel coords.

◆ getRGBmode()

int EMAN::ColorRGBGenerator::getRGBmode ( )
inline

Return RGB mode.

Definition at line 237 of file marchingcubes.h.

238 {
239 return rgbmode;
240 }

References rgbmode.

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

◆ set_cmap_data()

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

Set min max data.

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

◆ set_data()

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

set the emdata

◆ setMinMax()

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

Set the mn max for cmap coloring.

Definition at line 229 of file marchingcubes.h.

230 {
231 minimum = min;
232 maximum = max;
233 needtorecolor = true;
234 }

References maximum, minimum, and needtorecolor.

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

◆ setNeedToRecolor()

void EMAN::ColorRGBGenerator::setNeedToRecolor ( bool  recolor)
inline

Definition at line 248 of file marchingcubes.h.

249 {
250 needtorecolor = recolor;
251 }

References needtorecolor.

◆ setOrigin()

void EMAN::ColorRGBGenerator::setOrigin ( int  orix,
int  oriy,
int  oriz 
)
inline

Set origin.

Definition at line 207 of file marchingcubes.h.

208 {
209 originx = orix;
210 originy = oriy;
211 originz = oriz;
212 needtorecolor = true;
213 }

References needtorecolor, originx, originy, and originz.

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

◆ setRGBmode()

void EMAN::ColorRGBGenerator::setRGBmode ( int  mode)
inline

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

Definition at line 222 of file marchingcubes.h.

223 {
224 rgbmode = mode;
225 needtorecolor = true;
226 }

References needtorecolor, and rgbmode.

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

◆ setScale()

void EMAN::ColorRGBGenerator::setScale ( float  i,
float  o 
)
inline

Set scaling.

Definition at line 215 of file marchingcubes.h.

216 {
217 inner = i;
218 outer = o;
219 needtorecolor = true;
220 }

References inner, needtorecolor, and outer.

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

Member Data Documentation

◆ cmap

EMData* EMAN::ColorRGBGenerator::cmap
private

Definition at line 266 of file marchingcubes.h.

◆ colormap

float* EMAN::ColorRGBGenerator::colormap
private

Definition at line 264 of file marchingcubes.h.

◆ em_data

EMData* EMAN::ColorRGBGenerator::em_data
private

Definition at line 265 of file marchingcubes.h.

◆ inner

float EMAN::ColorRGBGenerator::inner
private

Definition at line 257 of file marchingcubes.h.

Referenced by setScale().

◆ maximum

float EMAN::ColorRGBGenerator::maximum
private

Definition at line 260 of file marchingcubes.h.

Referenced by setMinMax().

◆ minimum

float EMAN::ColorRGBGenerator::minimum
private

Definition at line 259 of file marchingcubes.h.

Referenced by setMinMax().

◆ needtorecolor

bool EMAN::ColorRGBGenerator::needtorecolor
private

◆ originx

int EMAN::ColorRGBGenerator::originx
private

Definition at line 254 of file marchingcubes.h.

Referenced by setOrigin().

◆ originy

int EMAN::ColorRGBGenerator::originy
private

Definition at line 255 of file marchingcubes.h.

Referenced by setOrigin().

◆ originz

int EMAN::ColorRGBGenerator::originz
private

Definition at line 256 of file marchingcubes.h.

Referenced by setOrigin().

◆ outer

float EMAN::ColorRGBGenerator::outer
private

Definition at line 258 of file marchingcubes.h.

Referenced by setScale().

◆ rgb

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

Definition at line 268 of file marchingcubes.h.

◆ rgbmode

int EMAN::ColorRGBGenerator::rgbmode
private

Definition at line 253 of file marchingcubes.h.

Referenced by getRGBmode(), and setRGBmode().


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