18 #include <CutSurf.hpp> 20 #include <ImageData.hpp> 21 #include <MGXViewer/qglviewer.h> 36 virtual void interpolateAtTime(
float time);
38 std::vector<float> zooms;
66 void getOrthoWidthHeight(GLdouble& halfWidth, GLdouble& halfHeight)
const;
72 virtual void addKeyFrameToPath(
int i);
74 virtual void playPath(
int i);
76 virtual void deletePath(
int i);
78 virtual void resetPath(
int i);
80 virtual void drawAllPaths();
84 return _frame->zoom();
124 std::set<mgx::vertex::identity_t> selectV;
128 bool pixelEditCursor;
131 mgx::Shader raycasting_shader1, raycasting_shader2;
133 mgx::Shader final_combine_shader, combine_shader, render_depth_shader;
134 mgx::Shader texture_surf_shader, index_surf_shader;
135 mgx::Shader volume_surf_shader1, volume_surf_shader2;
139 GLuint baseFboId, fboId, fboCopyId;
140 GLuint depthTexId[NB_FRAMES];
141 GLuint colorTexId[NB_FRAMES];
143 std::vector<GLfloat> depthTexture;
144 int drawWidth, drawHeight;
145 int prevWidth, prevHeight;
147 enum SelectMode { NONE, MOVE, SELRECT };
148 SelectMode selectMode;
158 bool deletePckdLabel;
166 bool selectConnected;
186 int texWidth, texHeight;
193 float GlobalBrightness;
194 float GlobalContrast;
195 float UnsharpStrength;
197 float ZoomFactor()
const;
198 void setZoomFactor(
float f);
205 float getSceneRadius()
const {
209 void processRunning(
bool state)
211 _processRunning = state;
214 bool processRunning()
216 return _processRunning;
222 QString fullSnapshotFileName();
223 void initObject(
QWidget* parent);
226 bool _processRunning;
236 static void initFormat();
240 void drawSelectRect();
241 void drawPixelCursor();
242 void checkPixelCursor(
bool altPressed);
245 void setLighting(
bool isStack1);
250 void startScreenCoordinatesSystem(
bool upward =
false)
const;
257 virtual void postDraw();
260 void resizeGL(
int width,
int height);
261 void updateFBOTex(
int width,
int height,
bool fast_draw =
false);
262 void drawColorTexture(
int i,
bool draw_depth =
false);
263 void alternatePeels(
int& curPeelId,
int& prevPeelId,
int fullImgId);
264 void combinePeels(
int& fullImgId,
int curPeelId,
int volume1,
int volume2);
265 void setupCopyFB(GLuint depth, GLint color);
266 void setupFramebuffer(GLuint depth, GLuint color, GLbitfield clear = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
267 void resetupFramebuffer(GLuint depth, GLuint color, GLbitfield clear = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
268 void resetFramebuffer();
269 void leaveEvent(
QEvent* e);
270 void enterEvent(
QEvent* e);
282 void findSelectTriangle(
mgx::ImgData* stk, uint x, uint y, std::vector<uint>& vlist,
int& label,
283 bool useParentLabel =
true);
288 Qt::MouseButtons lastButtons;
294 void pixelEditStop();
299 void deletePickedLabelMove(
QMouseEvent* e,
bool replace =
false);
300 void deletePickedLabel();
303 void pickVolumeLabelStop();
309 void labelEditStop();
313 void ClipEnableSlot(
mgx::Clip* c,
bool _val);
314 void ClipGridSlot(
mgx::Clip* c,
bool _val);
315 void ClipWidthSlot(
mgx::Clip* c,
int _val);
318 void setLabel(
int label);
319 void selectMeshLabel(
int label,
bool replace =
true);
320 void selectMeshLabel(
int label,
int repeat,
bool replace =
true);
321 void unselectMeshLabel(
int label);
322 void ReloadShaders();
326 void editMainTransferFunction1();
327 void editWorkTransferFunction1();
328 void editSurfTransferFunction1();
329 void editHeatTransferFunction1();
330 void editMainTransferFunction2();
331 void editWorkTransferFunction2();
332 void editSurfTransferFunction2();
333 void editHeatTransferFunction2();
334 void loadFile(
const QString& pth,
bool stack2,
bool load_work);
338 void Clip1EnableSlot(
bool _val) {
339 ClipEnableSlot(c1, _val);
341 void Clip1GridSlot(
bool _val) {
342 ClipGridSlot(c1, _val);
344 void Clip1WidthSlot(
int _val) {
345 ClipWidthSlot(c1, _val);
347 void Clip2EnableSlot(
bool _val) {
348 ClipEnableSlot(c2, _val);
350 void Clip2GridSlot(
bool _val) {
351 ClipGridSlot(c2, _val);
353 void Clip2WidthSlot(
int _val) {
354 ClipWidthSlot(c2, _val);
356 void Clip3EnableSlot(
bool _val) {
357 ClipEnableSlot(c3, _val);
359 void Clip3GridSlot(
bool _val) {
360 ClipGridSlot(c3, _val);
362 void Clip3WidthSlot(
int _val) {
363 ClipWidthSlot(c3, _val);
366 void FlySpeedSlot(
int val) {
367 FlySpeed = float(val) / 10000.0;
369 void DrawCellMapSlot(
bool val)
374 void SlicesSlot(
int val)
376 mgx::ImgData::Slices = val;
379 void ScreenSamplingSlot(
int val);
380 void Surf1BrightSlot(
int val)
382 stack1->mesh->setBrightness(
float(val) / 10000.0);
385 void Surf2BrightSlot(
int val)
387 stack2->mesh->setBrightness(
float(val) / 10000.0);
390 void LabelColorSlot();
391 void ResetViewSlot();
393 void recordMovie(
bool on);
395 void saveScreenshot(
bool automatic =
false,
bool overwrite =
false)
399 void saveScreenshot(
const QString& fileName,
bool overwrite =
false)
403 void setScreenshotFileName(
const QString& name) {
406 void setScreenshotFormat(
const QString& format) {
409 void setScreenshotCounter(
int counter) {
412 void setScreenshotQuality(
int quality) {
415 bool openScreenshotFormatDialog() {
419 virtual void initFromDOMElement(
const QDomElement& element);
421 void ViewerUpdateSlot() {
424 void ToggleHeatMapSlot();
426 virtual bool saveImageSnapshot(
const QString& fileName,
QSize finalSize,
double oversampling = 1.0,
427 bool expand =
false,
bool has_gui =
false);
429 bool saveImageSnapshot(
const QString& fileName,
QSize finalSize,
double oversampling,
bool expand,
bool has_gui,
432 void showEntireScene() {
433 camera()->showEntireScene();
437 void deleteSelection();
439 void stepDrawFinished(
bool);
440 void setLabelColor(
QIcon&);
441 void recordingMovie(
bool);
442 void changeSceneRadius(
float);
443 void selectLabelChanged(
int);
setSnapshotQuality(int quality)
saveSnapshot(bool automatic=true, bool overwrite=false)
setSnapshotFormat(const QString &format)
Definition: MorphoViewer.hpp:33
This file contains the definition of a clipping region.
This file contains the definition of a vertex.
Definition: MorphoViewer.hpp:61
setSnapshotCounter(int counter)
setSnapshotFileName(const QString &name)
Definition: MorphoViewer.hpp:106
Class to handle rotatable pair of clipping planes.
Definition: ClipRegion.hpp:38
Definition: MorphoViewer.hpp:41
Definition: Shader.hpp:279
openSnapshotFormatDialog()
The Store class holds the actual 3D data and properties specific to it.
Definition: Store.hpp:35
Definition: MorphoGraphX.hpp:53
This file contains the definition of an edge data.
Common definitions and utilities for all geometry algorithms This file is shared by cuda...
A utility class to parse L-Studio like parameter files.
Definition: Parms.hpp:115
Definition: CutSurf.hpp:31
Definition: ImageData.hpp:47