OpenStructure
Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions
MapIso Class Reference

#include <map_iso.hh>

Inherits GfxObj.

Public Member Functions

 MapIso (const String &name, const img::MapHandle &mh, float level, uint a=0)
 
virtual geom::AlignedCuboid GetBoundingBox (bool use_global=false) const
 
virtual geom::Vec3 GetCenter () const
 
virtual void CustomRenderGL (RenderPass pass)
 
virtual void CustomRenderPov (PovState &pov)
 
virtual void OnInput (const InputEvent &e)
 
virtual void OnRenderModeChange ()
 
void Rebuild ()
 
void SetLevel (float l)
 
float GetMinLevel () const
 
float GetMaxLevel () const
 
float GetLevel () const
 
float GetMean () const
 
float GetStdDev () const
 
std::vector< int > GetHistogram () const
 
void SetHistogramBinCount (int count)
 
int GetHistogramBinCount () const
 
img::ImageHandleGetMap ()
 
img::ImageHandleGetOriginalMap ()
 
img::ImageHandleGetDownsampledMap ()
 
void ShowDownsampledMap ()
 
void ShowOriginalMap ()
 
bool IsDownsampledMapAvailable () const
 
MapIsoType GetShownMapType () const
 
void SetColor (const Color &color)
 
const ColorGetColor () const
 
void SetNSF (float smoothf)
 
void SetDebugOctree (bool flag)
 
void MakeOctreeDirty ()
 
bool IfOctreeDirty () const
 
- Public Member Functions inherited from GfxObj
 GfxObj (const String &name)
 
virtual GfxNodeP Copy () const
 
virtual void DeepSwap (GfxObj &go)
 
virtual void RenderGL (RenderPass pass)
 
virtual void RenderPov (PovState &pov)
 
virtual void Export (Exporter *ex)
 
virtual void Apply (GfxNodeVisitor &v, GfxNodeVisitor::Stack st)
 
virtual int GetType () const
 
virtual void SetMatAmb (const Color &c)
 
virtual void SetMatDiff (const Color &c)
 
virtual void SetMatSpec (const Color &c)
 
virtual void SetMatShin (float s)
 
virtual void SetMatEmm (const Color &c)
 
virtual void ContextSwitch ()
 
virtual void SetRenderMode (RenderMode::Type m)
 
virtual RenderMode::Type GetRenderMode () const
 
virtual void SetLineWidth (float w)
 
virtual void SetPolyMode (unsigned int m)
 
virtual void SetAALines (bool f)
 
virtual void SetLineHalo (float f)
 
virtual void SetOutline (bool f)
 
virtual bool GetOutline () const
 
virtual void SetOutlineMode (int m)
 
virtual int GetOutlineMode () const
 
virtual void SetOutlineWidth (float f)
 
virtual float GetOutlineWidth () const
 
virtual void SetOutlineExpandFactor (float f)
 
virtual float GetOutlineExpandFactor () const
 
virtual void SetOutlineExpandColor (const Color &c)
 
virtual Color GetOutlineExpandColor () const
 
virtual void SetOpacity (float f)
 
virtual float GetOpacity () const
 
virtual void SetSolid (bool f)
 
virtual bool GetSolid () const
 
virtual void SetSolidColor (const Color &c)
 
virtual Color GetSolidColor () const
 
virtual void SetClip (bool f)
 
virtual bool GetClip () const
 
virtual void SetClipPlane (const geom::Vec4 &)
 
virtual geom::Vec4 GetClipPlane () const
 
virtual void SetClipOffset (float f)
 
virtual float GetClipOffset () const
 
virtual void ColorBy (const mol::EntityView &ev, const String &prop, const Gradient &g, float minv, float maxv)
 
virtual void ColorBy (const img::MapHandle &mh, const String &prop, const Gradient &g, float minv, float maxv)
 
virtual void ProcessLimits (geom::Vec3 &minc, geom::Vec3 &maxc, const geom::Transform &tf) const
 
virtual void InitGL ()
 
virtual bool OnSelect (const geom::Line3 &l, geom::Vec3 &result, float zlim, bool pick_flag)
 
virtual void OnGLCleanup ()
 
void Clear ()
 
const geom::TransformGetTF () const
 
void SetTF (const geom::Transform &tf)
 
void AddLabel (const String &s, const geom::Vec3 &pos, const Color &col, float psize)
 
void AddLabel (const String &s, const geom::Vec3 &pos, const Color &col)
 
void AddLabel (const String &s, const geom::Vec3 &pos, float psize)
 
void AddLabel (const String &s, const geom::Vec3 &pos)
 
void ClearLabels ()
 
void FlagRebuild ()
 
void FlagRefresh ()
 
bool GetAALines () const
 
float GetLineWidth () const
 
float GetLineHalo () const
 
void SetNormalSmoothFactor (float smoothf)
 
float GetNormalSmoothFactor () const
 
Material GetMaterial () const
 
void SetMaterial (const Material &m)
 
void SmoothVertices (float smoothf)
 
void GLCleanup ()
 
void Debug (unsigned int flags)
 
IndexedVertexArrayGetVA ()
 
const IndexedVertexArrayGetVA () const
 
- Public Member Functions inherited from GfxObjBase
 GfxObjBase (const String &name)
 
- Public Member Functions inherited from GfxNode
 GfxNode (const String &name)
 
virtual ~GfxNode ()
 
virtual void DeepSwap (GfxNode &n)
 
String GetName () const
 
void RemoveAll ()
 
void Rename (const String &name)
 
void Add (GfxObjP obj)
 
bool IsNameAvailable (const String &name) const
 
void Remove (GfxObjP obj)
 
void Add (GfxNodeP node)
 
void Remove (GfxNodeP node)
 
void Remove (const String &name)
 
size_t GetChildCount () const
 
void Hide ()
 
void Show ()
 
bool IsVisible () const
 
bool IsAttachedToScene () const
 
gfx::GfxNodeP GetParent () const
 
const GfxNodeVectorGetChildren () const
 
GfxNodeVectorGetChildren ()
 

Static Public Attributes

static bool global_downsampling_flag
 

Protected Member Functions

void UpdateRenderParams ()
 
void CalculateStat () const
 
void CalculateHistogram () const
 
virtual void CustomPreRenderGL (bool flag)
 
- Protected Member Functions inherited from GfxObj
void PreRenderGL (bool flag)
 
void AppendColorOp (gfx::ColorOp *op)
 
void CleanColorOps ()
 
void ReapplyColorOps ()
 
void render_labels () const
 
void render_depth_only ()
 

Static Protected Member Functions

static img::ImageHandle DownsampleMap (const img::ImageHandle &mh)
 

Additional Inherited Members

- Static Public Member Functions inherited from GfxObj
static Color Ele2Color (const String &ele)
 
- Protected Attributes inherited from GfxObj
IndexedVertexArray va_
 
RenderMode::Type render_mode_
 
unsigned int debug_flags_
 
geom::Transform transform_
 
bool rebuild_
 
bool refresh_
 
float line_width_
 
unsigned int poly_mode_
 
bool aalines_flag_
 
float line_halo_
 
Material mat_
 
unsigned int mat_dlist_
 
bool mat_update_
 
float opacity_
 
float smoothf_
 
bool outline_flag_
 
int outline_mode_
 
bool solid_
 
Color solid_color_
 
bool clip_flag_
 
geom::Vec4 clip_plane_
 
float clip_offset_
 
boost::ptr_vector< gfx::ColorOpc_ops_
 
TextPrimList labels_
 
bool use_occlusion_
 

Detailed Description

isocontour rendering for 3D image data

Two render modes are supported: gfx::RenderMode::SIMPLE renders the map in wireframe mode, gfx::RenderMode::FILL renders a shaded isocontoured map.

See also
gfx::MapSlab

Definition at line 52 of file map_iso.hh.

Constructor & Destructor Documentation

◆ MapIso()

MapIso ( const String name,
const img::MapHandle mh,
float  level,
uint  a = 0 
)

Member Function Documentation

◆ CalculateHistogram()

void CalculateHistogram ( ) const
protected

◆ CalculateStat()

void CalculateStat ( ) const
protected

◆ CustomPreRenderGL()

virtual void CustomPreRenderGL ( bool  flag)
protectedvirtual

Reimplemented from GfxObj.

◆ CustomRenderGL()

virtual void CustomRenderGL ( RenderPass  pass)
virtual

Reimplemented from GfxObj.

◆ CustomRenderPov()

virtual void CustomRenderPov ( PovState pov)
virtual

Reimplemented from GfxObj.

◆ DownsampleMap()

static img::ImageHandle DownsampleMap ( const img::ImageHandle mh)
staticprotected

◆ GetBoundingBox()

virtual geom::AlignedCuboid GetBoundingBox ( bool  use_global = false) const
virtual

returns bounding box of iso-contour object, not overall map

Reimplemented from GfxObj.

◆ GetCenter()

virtual geom::Vec3 GetCenter ( ) const
virtual

returns center of iso-contour object, not overall map

Reimplemented from GfxObj.

◆ GetColor()

const Color& GetColor ( ) const
inline

get color

See also
SetColor()

Definition at line 137 of file map_iso.hh.

◆ GetDownsampledMap()

img::ImageHandle& GetDownsampledMap ( )

get the map handle of the downsampled map

◆ GetHistogram()

std::vector<int> GetHistogram ( ) const

get histogram

◆ GetHistogramBinCount()

int GetHistogramBinCount ( ) const

get Histogram bin count

◆ GetLevel()

float GetLevel ( ) const

get current isocontouring level

◆ GetMap()

img::ImageHandle& GetMap ( )

get the map handle of the currently displayed map

◆ GetMaxLevel()

float GetMaxLevel ( ) const

◆ GetMean()

float GetMean ( ) const

get mean value of map

◆ GetMinLevel()

float GetMinLevel ( ) const

◆ GetOriginalMap()

img::ImageHandle& GetOriginalMap ( )

get the map handle of the original map

◆ GetShownMapType()

MapIsoType GetShownMapType ( ) const

returns the type of map currently being show

◆ GetStdDev()

float GetStdDev ( ) const

get std dev of map.

◆ IfOctreeDirty()

bool IfOctreeDirty ( ) const

checks is the octree needs to be rebuilt

◆ IsDownsampledMapAvailable()

bool IsDownsampledMapAvailable ( ) const

checks if the downsampled map is available

◆ MakeOctreeDirty()

void MakeOctreeDirty ( )

flags the octree to be rebuilt

◆ OnInput()

virtual void OnInput ( const InputEvent e)
virtual

Reimplemented from GfxObj.

◆ OnRenderModeChange()

virtual void OnRenderModeChange ( )
virtual

Reimplemented from GfxObj.

◆ Rebuild()

void Rebuild ( )

◆ SetColor()

void SetColor ( const Color color)
inline

set color

By default, the color is white.

See also
GetColor()

Definition at line 130 of file map_iso.hh.

◆ SetDebugOctree()

void SetDebugOctree ( bool  flag)
inline

Definition at line 139 of file map_iso.hh.

◆ SetHistogramBinCount()

void SetHistogramBinCount ( int  count)

set Histogram bin count

◆ SetLevel()

void SetLevel ( float  l)

set isocontouring level

Will force rebuild of the vertex buffers/indices

◆ SetNSF()

void SetNSF ( float  smoothf)

◆ ShowDownsampledMap()

void ShowDownsampledMap ( )

sets the donwsampled map to active

◆ ShowOriginalMap()

void ShowOriginalMap ( )

sets the original map to active

◆ UpdateRenderParams()

void UpdateRenderParams ( )
protected

Field Documentation

◆ global_downsampling_flag

bool global_downsampling_flag
static

Definition at line 147 of file map_iso.hh.


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