MorphoGraphX
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Slots | Signals | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
mgx::ImgData Class Reference
+ Inheritance diagram for mgx::ImgData:

Public Types

typedef Mesh::MeshView MeshViewModeEnum
 

Public Slots

void updColor ()
 
void MainShowSlot (bool val)
 
void MainBrightSlot (int val)
 
void MainOpacitySlot (int val)
 
void MainLabelsSlot (bool val)
 
void Main16BitSlot (bool val)
 
void WorkShowSlot (bool val)
 
void WorkBrightSlot (int val)
 
void WorkOpacitySlot (int val)
 
void WorkLabelsSlot (bool val)
 
void Work16BitSlot (bool val)
 
void SurfShowSlot (bool val)
 
void SurfBrightSlot (int val)
 
void SurfOpacitySlot (int val)
 
void SurfBlendSlot (bool val)
 
void SurfCullSlot (bool val)
 
void SurfNormalSlot (bool val)
 
void SurfLabelSlot (bool val)
 
void SurfHeatSlot (bool val)
 
void SurfParentSlot (bool val)
 
void SurfSignalSlot (bool val)
 
void SurfTextureSlot (bool val)
 
void SurfImageSlot (bool val)
 
void MeshShowSlot (bool val)
 
void ChangeMeshViewModeSlot (int mode)
 
void MeshLinesSlot (bool val)
 
void MeshPointsSlot (bool val)
 
void CellMapSlot (bool val)
 
void ShowTransSlot (bool val)
 
void ShowScaleSlot (bool val)
 
void ShowBBoxSlot (bool val)
 
void TieScalesSlot (bool val)
 
void ScaleSlotX (int val)
 
void ScaleSlotY (int val)
 
void ScaleSlotZ (int val)
 
void setSurfColorMap (const TransferFunction &fct)
 
void setHeatColorMap (const TransferFunction &fct)
 
void setWorkColorMap (const TransferFunction &fct)
 
void setMainColorMap (const TransferFunction &fct)
 
void updateSurfColorMap (const TransferFunction &fct)
 
void updateHeatColorMap (const TransferFunction &fct)
 
void updateWorkColorMap (const TransferFunction &fct)
 
void updateMainColorMap (const TransferFunction &fct)
 
void updateImgData ()
 
void postUpdateImgData (bool lines, bool tris)
 

Signals

void changedInterface ()
 
void changeSize (const Point3u &size, const Point3f &step, const Point3f &origin)
 
void stackUnloaded ()
 
void viewerUpdate ()
 
void updateSliderScale ()
 
void forceSurfHeat ()
 

Public Member Functions

 ImgData (int id, QWidget *_parent=0)
 
void init (Stack *s, Mesh *m)
 
void setWork16Bit (bool val)
 
void setMain16Bit (bool val)
 
void readParms (util::Parms &parms, QString section)
 
void writeParms (QTextStream &pout, QString section)
 
qglviewer::ManipulatedFramegetFrame ()
 
qglviewer::ManipulatedFramegetMainFrame ()
 
qglviewer::ManipulatedFramegetTransFrame ()
 
int eval (Point3f p)
 
void drawStack (Shader *shader)
 
void setColorMap (const QString &pth, bool work)
 
void updateHeatHistogram ()
 
void updateSurfHistogram ()
 
void updateWorkHistogram ()
 
void updateMainHistogram ()
 
void editMainTransferFunction (QWidget *parent=0)
 
void editWorkTransferFunction (QWidget *parent=0)
 
void editSurfTransferFunction (QWidget *parent=0)
 
void editHeatTransferFunction (QWidget *parent=0)
 
void updateSurfColorMap ()
 
void updateHeatColorMap ()
 
void updateWorkColorMap ()
 
void updateMainColorMap ()
 
void updateColorMap (bool &newColorMap, std::vector< TransferFunction::Colorf > &ColorMap, const TransferFunction &transferFct)
 
void setupSurfColorMap ()
 
void setupHeatColorMap ()
 
void setupMainColorMap ()
 
void setupMainColorMap2 ()
 
void setupWorkColorMap ()
 
void setupWorkColorMap2 ()
 
void setupLabelColorMap ()
 
void setupColorMap (bool &newColorMap, GLuint &cmapTexId, const std::vector< TransferFunction::Colorf > &ColorMap, Shader::ActiveTextures activeTex)
 
void drawMesh (bool select)
 
void drawVertexVertexLine (ImgData *stack)
 
void drawCellAxis ()
 
void drawBBox ()
 
void setup3DRenderingData (Shader *shader)
 
void drawSurf (bool select, Shader *texture_shader=0, Shader *label_shader=0, Shader *volume_shader=0)
 
bool showOpaqueSurface ()
 
bool showTransparentSurface ()
 
void setupVolumeShader (Shader &shader, int pos)
 
void markMargin (std::set< vertex > &M, bool remborders)
 
void chkGraph ()
 
void subdivideBisect (vertex v1, vertex v2, vertex v3)
 
void markBorder (float borderSize)
 
void getLabelMaps (float borderSize)
 
bool isBordTriangle (int label, vertex v, vertex n, vertex m, IntIntPair &rp)
 
void getClipTestData (ClipRegion &clip1, ClipRegion &clip2, ClipRegion &clip3)
 
bool clipTest (const Point3i &ip)
 
void makeNhbd (std::vector< vertex > &vtxs)
 
void makeNhbd (vvgraph &S, vertex v, vertex n1, vertex n2, vertex n3, vertex n4)
 
void makeNhbd (vvgraph &S, vertex v, vertex n1, vertex n2, vertex n3, vertex n4, vertex n5, vertex n6)
 
int getPointsICP (std::vector< Point3f > &pts, qglviewer::Frame &frame)
 
void resetStack ()
 
void resetMesh ()
 
void initControls (QWidget *viewer)
 
int getLabel (vertex v1, vertex v2, vertex v3, bool useParentLabel=true) const
 
void unloadTex ()
 
void loadTex ()
 
void reloadLabelTex ()
 
void reloadMainTex (const BoundingBox3i &bbox=BoundingBox3i())
 
void reloadWorkTex (const BoundingBox3i &bbox=BoundingBox3i())
 
void reloadTex (GLuint texId)
 
void updateTex (GLuint texId, BoundingBox3i bBox)
 
void initTex ()
 
void bind3DTex (GLuint texId, Shader::ActiveTextures atexId=Shader::AT_TEX3D)
 
void bind2DTex (GLuint texId)
 
void unbind3DTex ()
 
void unbind2DTex ()
 
void loadImgTex (const QImage &image)
 
void fillLabel (int label, int currlabel)
 
void setParent (int label, int parentLabel)
 
void selectLabel (int label, int repeat=0)
 
void unselectLabel (int label)
 
void selectParent (int label, int repeat=0)
 
void unselectParent (int label)
 
void selectConnected (std::vector< uint > &vlist, bool unselect)
 
void addSeed (int label, std::vector< uint > &vlist)
 
void fillSelect (int label)
 
void deleteLabel (int label)
 
void marginNormalsVBOs ()
 
void updateTris ()
 
void updateTris (vvgraph &T)
 
void updateLines ()
 
void updatePos ()
 
void fillVBOs ()
 
void correctSelection (bool inclusive)
 
void updateSelection ()
 
void updColorVBOs ()
 
void updPos (std::set< uint > &vlist, bool points)
 
void findSelectTriangle (uint x, uint y, std::vector< uint > &vlist, int &label, bool useParentLabel=true)
 
int findSelectPoint (uint x, uint y)
 
bool findSeedPoint (uint x, uint y, CutSurf &cutSurf, Point3f &p)
 
void clearMeshSelect ()
 
void addSelect (const std::vector< uint > &vlist)
 
void removeSelect (const std::vector< uint > &vlist)
 
void updColor (const std::vector< uint > &vlist)
 
void bBoxClip (BoundingBox3f &bBox, Point3f p, Point3f n)
 
void bBoxFromClip ()
 
void pixelEditStart (ClipRegion &clip1, ClipRegion &clip2, ClipRegion &clip3)
 
void pixelEdit (float pixelRadius, const Point3f &p, const Point3f &px, const Point3f &py, const Point3f &pz, bool doCut, int currentLabel)
 
void pixelEditStop ()
 
bool isMainVisible () const
 
bool isWorkVisible () const
 
bool isVisible () const
 
HVecUS & currentData ()
 
const HVecUS & currentData () const
 
Point3f imageGradientW (Point3d worldpos)
 
Point3f imageGradientI (Point3i ipos)
 
uint imageLevel (Point3d worldpos)
 
Point2i imageMinMax ()
 
GLenum interpolation (GLuint texId)
 
GLenum internalFormat (GLuint texId)
 
GLenum swapTextureBytes (GLuint texId)
 
void updateStackSize ()
 
void setTexScale (float s)
 
bool valid () const
 
float trimTex (const float val)
 
Point2f trimTex (const Point2f &val)
 
template<typename T >
Point3f imageToWorld (const util::Vector< 3, T > &img) const
 Go from image coordinates to world coordinates.
 
template<typename T >
util::Vector< 3, T > worldToImage (Point3f wrld) const
 Go from world coordinates to image coordinates.
 
Point3f worldToImagef (const Point3f &a) const
 
Point3i worldToImagei (const Point3f &a) const
 
Point3u worldToImageu (const Point3f &a) const
 
int toSliderScale (float s)
 
float fromSliderScale (int i)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent=0)
 
 blockSignals (bool block)
 
 childEvent (QChildEvent *event)
 
 children ()
 
 connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type=Qt::AutoConnection)
 
 connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type=Qt::AutoConnection)
 
 connectNotify (const char *signal)
 
 customEvent (QEvent *event)
 
 deleteLater ()
 
 destroyed (QObject *obj=0)
 
 disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
 disconnect (const char *signal=0, const QObject *receiver=0, const char *method=0)
 
 disconnect (const QObject *receiver, const char *method=0)
 
 disconnectNotify (const char *signal)
 
 dumpObjectInfo ()
 
 dumpObjectTree ()
 
 dynamicPropertyNames ()
 
 event (QEvent *e)
 
 eventFilter (QObject *watched, QEvent *event)
 
 findChild (const QString &name=QString()
 
 findChildren (const QString &name=QString()
 
 findChildren (const QRegExp &regExp)
 
 inherits (const char *className)
 
 installEventFilter (QObject *filterObj)
 
 isWidgetType ()
 
 killTimer (int id)
 
 metaObject ()
 
 moveToThread (QThread *targetThread)
 
 parent ()
 
 property (const char *name)
 
 receivers (const char *signal)
 
 removeEventFilter (QObject *obj)
 
 sender ()
 
 setParent (QObject *parent)
 
 setProperty (const char *name, const QVariant &value)
 
 signalsBlocked ()
 
 startTimer (int interval)
 
 thread ()
 
 timerEvent (QTimerEvent *event)
 
 tr (const char *sourceText, const char *disambiguation=0, int n=-1)
 
 trUtf8 (const char *sourceText, const char *disambiguation=0, int n=-1)
 
 staticMetaObject
 

Public Attributes

int StackId
 
Stackstack
 
Meshmesh
 
bool Main16Bit
 
bool Work16Bit
 
bool needUpdateLines
 
bool needUpdateTris
 
gui::TransferFunctionDlgworkTransferDlg
 
gui::TransferFunctionDlgmainTransferDlg
 
gui::TransferFunctionDlgsurfTransferDlg
 
gui::TransferFunctionDlgheatTransferDlg
 
std::vector
< TransferFunction::Colorf
MainColorMap
 
std::vector
< TransferFunction::Colorf
WorkColorMap
 
std::vector
< TransferFunction::Colorf
SurfColorMap
 
std::vector
< TransferFunction::Colorf
HeatColorMap
 
bool newMainColorMap
 
bool newWorkColorMap
 
bool newSurfColorMap
 
bool newHeatColorMap
 
std::vector< double > MainHist
 
std::vector< double > WorkHist
 
std::vector< double > SurfHist
 
std::vector< double > HeatHist
 
std::pair< double, double > mainBounds
 
std::pair< double, double > workBounds
 
GLuint mainDataTexId
 
GLuint workDataTexId
 
GLuint dataTexColor
 
GLuint surfTexId
 
GLuint heatTexId
 
GLuint imgTexId
 
GLuint mcmapTexId
 
GLuint wcmapTexId
 
GLuint labelTexId
 
graph::vertex_identity_t lineId
 
std::set< uint > selectV
 
Colors::ColorType MeshColor
 
Colors::ColorType MeshBorderColor
 
Colors::ColorType MeshSelectColor
 
int TCount
 
int LCount
 
int VCount
 
std::vector< vertexidVA
 
std::vector< vertexpidVA
 
std::unordered_map< vertex, uint > vMap
 
std::vector< Point3fposVA
 
std::vector< Point3fnrmlVA
 
std::vector< Point3GLubselVA
 
std::vector< Point3ftexVA
 
std::vector< Point2fimgVA
 
std::vector< uint > lineVA
 
std::vector< uint > lbrdVA
 
std::vector< uint > lcellVA
 
std::vector< uint > lselVA
 
std::vector< uint > pbrdVA
 
std::vector< uint > pcellVA
 
std::vector< uint > pselVA
 
std::vector< Point3fpntsVA
 
std::vector< Point3GLubpcolVA
 
std::vector< Point3GLubpselcolVA
 
GLuint posVAid
 
GLuint nrmlVAid
 
GLuint selVAid
 
GLuint texVAid
 
GLuint imgVAid
 
GLuint pntsVAid
 
GLuint pcolVAid
 
GLuint pselVAid
 
GLubyte * texMap
 
QString Section
 
std::vector< QStringImageFiles
 
QWidgetparent
 
float min
 
float max
 
float labelWallBordMin
 
float labelWallBordMax
 
QString sigStr
 
IntPoint3fMap LabC
 
Point3u clipDo
 
Point4f pn [6]
 
HVec4F Hpn
 
Matrix4d frm
 
Matrix4d clm [3]
 
float pixelRadius
 
BoundingBox3f bBox
 
BoundingBox3i bBoxTex
 
int marchLabel
 
bool LoadMeshAdd
 
float meshShift
 
HVecUS * marchData
 
bool EnableRotate
 
bool readOnce
 
bool LabelColorsChanged
 
bool changed
 
bool pixelsChanged
 

Static Public Attributes

static const uint RELOAD_NONE
 
static const uint RELOAD_MAIN
 
static const uint RELOAD_WORK
 
static const uint RELOAD_TRIS
 
static const uint RELOAD_LINES
 
static const uint RELOAD_POS
 
static const uint RELOAD_VBO
 
static const uint UPDATE_SELECTION
 
static int ClearColor
 
static uint Slices
 
static uint TileCount
 
static Point3u MaxTexSize
 
static float ZOffset
 
static float DrawNormals
 
static float DrawOffset
 
static float DrawZeroLabels
 
static float DrawNhbds
 
static bool DeleteBadVertex
 
static bool FillWorkData
 
static bool SeedStack
 
static int PixelEditRadius
 
static int PixelEditMaxPix
 
static std::vector< ColorfLabelColors
 
static bool MeshSelect
 
static ScaleBar scaleBar
 
static Colorbar colorBar
 
static float MeshPointSize
 
static float MeshLineWidth
 

Protected Member Functions

void updLabel (int label, std::vector< uint > &vlist)
 
bool addTriangle (std::vector< vertex > &vertices, Point3i tri)
 
void meshFromTriangles (std::vector< vertex > &vertices, std::vector< Point3i > &triangles)
 
void projSignal (HVecUS &data, vertex v, float mindist, float maxdist)
 
void load3DTexData (const GLuint texId, const Point3u size, const ushort *data)
 
Point3u getTexStep ()
 
bool testQuad (float a, float b, float c, float d, float x)
 
Point3GLub pColor (const vertex &v)
 
bool lDraw (const vertex &a, const vertex &b)
 
size_t offset (uint x, uint y, uint z)
 
size_t offset (Point3i ipos)
 
bool boundsOK (int x, int y, int z)
 
void updateHistogram (std::vector< double > &hist, const HVecUS &data, std::pair< double, double > &minMaxValues, int max_data=1<< 16, int size=512)
 
void invalidateHistogram (std::vector< double > &hist)
 
void clearData (HVecUS &data)
 
Point3f texCoord (int label, vertex v)
 
Point3f texCoord (int label, vertex v, vertex a, vertex b, vertex c)
 
bool setLabel (vertex v1, vertex v2, vertex v3, int label)
 

Static Protected Member Functions

static bool uniqueTri (const vvgraph &S, const vertex &v, const vertex &n, const vertex &m)
 
static bool uniqueLine (const vvgraph &S, const vertex &v, const vertex &n)
 

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