MorphoGraphX  2.0-1-227
StackProcess.hpp
Go to the documentation of this file.
1 //
2 // This file is part of MorphoGraphX - http://www.MorphoGraphX.org
3 // Copyright (C) 2012-2015 Richard S. Smith and collaborators.
4 //
5 // If you use MorphoGraphX in your work, please cite:
6 // http://dx.doi.org/10.7554/eLife.05864
7 //
8 // MorphoGraphX is free software, and is licensed under under the terms of the
9 // GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
10 //
11 #ifndef STACK_PROCESS_HPP
12 #define STACK_PROCESS_HPP
13 
19 #include <Process.hpp>
20 
21 namespace mgx
22 {
25 
30  class mgxBase_EXPORT Annihilate : public Process
31  {
32  public:
33  Annihilate(const Process& process) : Process(process)
34  {
35  setName("Stack/Mesh Interaction/Annihilate");
36  setDesc("Keep or fill a layer near the mesh");
37  setIcon(QIcon(":/images/Annihilate.png"));
38 
39  addParm("Fill","Fill the layer with specified value, or keep the original data.","No", booleanChoice());
40  addParm("Fill Val","Value to fill the volume with.","30000");
41  addParm("Min Dist(µm)","Minimal distance from layer to mesh.","1.0");
42  addParm("Max Dist(µm)","Maximal distance from layre to mesh","5.0");
43  }
44 
45  bool run()
46  {
47  if(!checkState().store(STORE_NON_EMPTY).mesh(MESH_NON_EMPTY))
48  return false;
49  Store* input = currentStack()->currentStore();
50  Store* output = currentStack()->work();
51 
52  bool fill = stringToBool(parm("Fill"));
53  bool res
54  = run(input, output, currentMesh(), parm("Min Dist(µm)").toFloat(), parm("Max Dist(µm)").toFloat(),
55  fill, parm("Fill Val").toUInt());
56  if(res) {
57  input->hide();
58  output->show();
59  }
60  return res;
61  }
62 
71  bool run(const Store* input, Store* output, const Mesh* mesh, float minDist,
72  float maxDist, bool fill, uint fillval);
73  };
74 
80  class mgxBase_EXPORT AutoScaleStack : public Process
81  {
82  public:
83  AutoScaleStack(const Process& process) : Process(process) {}
84 
85  bool run()
86  {
87  if(!checkState().store(STORE_NON_EMPTY))
88  return false;
89  Store* input = currentStack()->currentStore();
90  Store* output = currentStack()->work();
91  bool res = run(input, output);
92  if(res) {
93  input->hide();
94  output->show();
95  }
96  return res;
97  }
98 
102  bool run(const Store* store, Store* output);
103  };
104 
110  class mgxBase_EXPORT ApplyTransferFunction : public Process
111  {
112  public:
113  ApplyTransferFunction(const Process& process) : Process(process)
114  {
115  setName("Stack/Filters/Apply Transfer Function");
116  setDesc("Apply the transfer function to the stack (modifies voxel values).");
117  setIcon(QIcon(":/images/Palette.png"));
118 
119  addParm("Red","Red","0");
120  addParm("Green","Green","0");
121  addParm("Blue","Blue","0");
122  addParm("Alpha","Alpha","1");
123  }
124 
125  bool run()
126  {
127  if(!checkState().store(STORE_NON_EMPTY))
128  return false;
129  Store* input = currentStack()->currentStore();
130  Store* output = currentStack()->work();
131  bool res
132  = run(input, output, parm("Red").toFloat(), parm("Green").toFloat(), parm("Blue").toFloat(),
133  parm("Alpha").toFloat());
134  if(res) {
135  input->hide();
136  output->show();
137  }
138  return res;
139  }
140 
152  bool run(Store* store, Store* output, float red, float green, float blue, float alpha);
153  };
154 
160  class mgxBase_EXPORT BlobDetect : public Process
161  {
162  public:
163  BlobDetect(const Process& process) : Process(process)
164  {
165  setName("Stack/Segmentation/Blob Detect");
166  setDesc("Find and label blobs in an image");
167  setIcon(QIcon(":/images/BlobDetect.png"));
168 
169  addParm("Use watershed","Use watershed","No", booleanChoice());
170  addParm("Start Label","Start Label","1");
171  }
172 
173  bool run()
174  {
175  if(!checkState().store(STORE_NON_EMPTY | STORE_NON_LABEL))
176  return false;
177  bool wat = stringToBool(parm("Use watershed"));
178  Store* input = currentStack()->currentStore();
179  Store* output = currentStack()->work();
180  bool res = run(input, output, wat, parm("Start Label").toUInt());
181  if(res) {
182  input->hide();
183  output->show();
184  }
185  return res;
186  }
187  bool run(const Store* input, Store* output, bool watershed, uint startlabel);
188  };
189 
195  class mgxBase_EXPORT ClearWorkStack : public Process
196  {
197  public:
198  ClearWorkStack(const Process& process) : Process(process)
199  {
200  setName("Stack/System/Clear Work Stack");
201  setDesc("Clear the work stack");
202  setIcon(QIcon(":/images/ClearStack.png"));
203 
204  addParm("Fill value","Fill value","0");
205 
206  }
207 
208  bool run()
209  {
210  if(!checkState().store(STORE_WORK))
211  return false;
212  return run(currentStack(), parm("Fill value").toUInt());
213  }
214 
215  bool run(Stack* stack, uint fillValue);
216  };
217 
223  class mgxBase_EXPORT ClearMainStack : public Process
224  {
225  public:
226  ClearMainStack(const Process& process) : Process(process)
227  {
228  setName("Stack/System/Clear Main Stack");
229  setDesc("Clear the main stack");
230  setIcon(QIcon(":/images/ClearStack.png"));
231 
232  addParm("Fill value","Fill value","0");
233 
234  }
235 
236  bool run()
237  {
238  if(!checkState().store(STORE_MAIN))
239  return false;
240  return run(currentStack(), parm("Fill value").toUInt());
241  }
242 
243  bool run(Stack* stack, uint fillValue);
244  };
245 
251  class mgxBase_EXPORT ClipStack : public Process
252  {
253  public:
254  ClipStack(const Process& process) : Process(process)
255  {
256  setName("Stack/Canvas/Clip Stack");
257  setDesc("Trim stack to clipping planes");
258  setIcon(QIcon(":/images/ClipStack.png"));
259  addParm("Trim canvas?","Use AutoTrim to reduce canvas size after clipping the stack.","No", booleanChoice());
260  }
261 
262  bool run()
263  {
264  if(!checkState().store(STORE_NON_EMPTY))
265  return false;
266  Store* input = currentStack()->currentStore();
267  Store* output = currentStack()->work();
268  bool res = run(input, output, stringToBool(parm("Trim canvas?")));
269  if(res) {
270  input->hide();
271  output->show();
272  }
273  return res;
274  }
275 
276  bool run(const Store* input, Store* output, bool trimStack);
277  };
278 
284  class mgxBase_EXPORT CopyMainToWork : public Process
285  {
286  public:
287  CopyMainToWork(const Process& process) : Process(process)
288  {
289  setName("Stack/MultiStack/Copy Main to Work Stack");
290  setDesc("Copy Main to Work Stack");
291  setIcon(QIcon(":/images/CopyMainToWork.png"));
292  }
293 
294  bool run()
295  {
296  if(!checkState().store(STORE_MAIN | STORE_NON_EMPTY))
297  return false;
298  Stack* stack = currentStack();
299  bool res = run(stack);
300  if(res) {
301  stack->main()->hide();
302  stack->work()->show();
303  }
304  return res;
305  }
306 
307  bool run(Stack* stack);
308  };
309 
315  class mgxBase_EXPORT CopyWorkToMain : public Process
316  {
317  public:
318  CopyWorkToMain(const Process& process) : Process(process)
319  {
320  setName("Stack/MultiStack/Copy Work to Main Stack");
321  setDesc("Copy Work to Main Stack");
322  setIcon(QIcon(":/images/CopyWorkToMain.png"));
323  }
324 
325  bool run()
326  {
327  if(!checkState().store(STORE_WORK | STORE_NON_EMPTY))
328  return false;
329  Stack* stack = currentStack();
330  bool res = run(stack);
331  if(res) {
332  stack->work()->hide();
333  stack->main()->show();
334  }
335  return res;
336  }
337 
338  bool run(Stack* stack);
339  };
340 
346  class mgxBase_EXPORT CopySwapStacks : public Process
347  {
348  public:
349  CopySwapStacks(const Process& process) : Process(process)
350  {
351  setName("Stack/MultiStack/Swap or Copy Stack 1 and 2");
352  setDesc("Copy or Swap Stack 1 and 2");
353  setIcon(QIcon(":/images/CopySwapStacks.png"));
354 
355  addParm("Store","Store","Main", QStringList() << "Main" << "Work");
356  addParm("Action","Action","1 -> 2", QStringList() << "1 -> 2" << "1 <- 2" << "1 <-> 2");
357  }
358 
359  bool run()
360  {
361  // Stack *stack = currentStack();
362  bool res = run(parm("Store"), parm("Action"));
363  // if(res)
364  //{
365  // stack->main()->hide();
366  // stack->work()->show();
367  //}
368  return res;
369  }
370 
371  bool run(const QString& storeStr, const QString& actionStr);
372  };
373 
379  class mgxBase_EXPORT StackMeshProcess : public Process
380  {
381  public:
382  StackMeshProcess(const Process& process) : Process(process)
383  {
384  setName("Stack/Mesh Interaction/Fill Stack from Mesh");
385  setDesc("Fill volume contained by closed mesh");
386  setIcon(QIcon(":/images/TrimStack.png"));
387 
388  addParm("Label", "If >= 0 only this label is used", "-1");
389  addParm("Fill Value","Fill Value", "32000");
390 
391  }
392 
393  bool run(bool fill)
394  {
395  if(!checkState().store(STORE_NON_EMPTY).mesh(MESH_NON_EMPTY))
396  return false;
397  Store* input = currentStack()->currentStore();
398  Store* output = currentStack()->work();
399  Mesh* mesh = currentMesh();
400  uint fillValue = 0;
401  if(fill)
402  fillValue = parm("Fill Value").toUInt();
403  bool res = run(input, output, mesh, parm("Label").toInt(), fill, fillValue);
404  if(res) {
405  input->hide();
406  output->show();
407  }
408  return res;
409  }
410 
411  bool run(const Store* input, Store* output, Mesh* mesh,
412  int label, bool fill, uint fillValue);
413  };
414 
420  class mgxBase_EXPORT FillStackToMesh : public StackMeshProcess
421  {
422  public:
423  FillStackToMesh(const Process& process) : StackMeshProcess(process)
424  {
425 
426  setName("Stack/Mesh Interaction/Fill Stack from Mesh");
427  setDesc("Fill volume contained by closed mesh");
428  setIcon(QIcon(":/images/TrimStack.png"));
429 
430  addParm("Label","If >= 0 only this label is used","-1");
431  addParm("Fill Value","Fill Value","32000");
432  }
433  using StackMeshProcess::run;
434  bool run() {
435  return run(true);}
436 
437  };
438 
444  class mgxBase_EXPORT TrimStackProcess : public StackMeshProcess
445  {
446  public:
447  TrimStackProcess(const Process& process) : StackMeshProcess(process)
448  {
449  setName("Stack/Mesh Interaction/Trim Stack");
450  setDesc("Trim parts of stack which are not contained within closed mesh.");
451  setIcon(QIcon(":/images/TrimStack.png"));
452 
453  addParm("Label", "If >= 0 only this label is used", "-1");
454  }
455  using StackMeshProcess::run;
456  bool run() {
457  return run(false);}
458 
459  };
460 
466  class mgxBase_EXPORT FillStack3D : public Process
467  {
468  public:
469  FillStack3D(const Process& process) : Process(process)
470  {
471  setName("Stack/Mesh Interaction/Fill Stack from 3D Mesh");
472  setDesc("Fill stack contained by labeled 3D mesh");
473  setIcon(QIcon(":/images/FillStack3D.png"));
474  }
475 
476  bool run()
477  {
478  if(!checkState().store(STORE_NON_EMPTY).mesh(MESH_NON_EMPTY))
479  return false;
480  Store* input = currentStack()->currentStore();
481  Store* output = currentStack()->work();
482  Mesh* mesh = currentMesh();
483  bool res = run(input, output, mesh);
484  if(res) {
485  input->hide();
486  output->show();
487  output->setLabels(true);
488  }
489  return res;
490  }
491 
492  bool run(const Store* input, Store* output, Mesh* mesh);
493 
494  };
495 
501  class mgxBase_EXPORT SwapStacks : public Process
502  {
503  public:
504  SwapStacks(const Process& process) : Process(process)
505  {
506  setName("Stack/MultiStack/Swap Main and Work Stacks");
507  setDesc("Swap the main and work data of the current stack.");
508  setIcon(QIcon(":/images/SwapStacks.png"));
509  }
510 
511  bool run()
512  {
513  if(!checkState().stack(STACK_NON_EMPTY))
514  return false;
515  Stack* s = currentStack();
516  if(!s) {
517  setErrorMessage("You need to select a stack to launch this process.");
518  return false;
519  }
520  return run(s);
521  }
522 
523  bool run(Stack* stack);
524  };
525 
531  class mgxBase_EXPORT ReverseStack : public Process
532  {
533  public:
534  ReverseStack(const Process& process) : Process(process)
535  {
536  setName("Stack/Canvas/Reverse Axes");
537  setDesc("Reverse the direction of the selected axes. Press A-key to display the axis.");
538  setIcon(QIcon(":/images/Resize.png"));
539 
540  addParm("X","X","No", QStringList() << "Yes" << "No");
541  addParm("Y","Y","No", QStringList() << "Yes" << "No");
542  addParm("Z","Z","Yes", QStringList() << "Yes" << "No");
543  }
544 
545  bool run()
546  {
547  if(!checkState().store(STORE_NON_EMPTY))
548  return false;
549  Stack* s = currentStack();
550  Store* input = s->currentStore();
551  Store* output = s->work();
552  bool reverse_x = stringToBool(parm("X"));
553  bool reverse_y = stringToBool(parm("Y"));
554  bool reverse_z = stringToBool(parm("Z"));
555  if(run(output, input, reverse_x, reverse_y, reverse_z)) {
556  input->hide();
557  output->show();
558  return true;
559  }
560  return false;
561  }
562 
563  bool run(Store* output, const Store* input, bool x, bool y, bool z);
564  };
565 
571  class mgxBase_EXPORT ChangeVoxelSize : public Process
572  {
573  public:
574  ChangeVoxelSize(const Process& process) : Process(process)
575  {
576  setName("Stack/Canvas/Change Voxel Size");
577  setDesc("Change the size of a voxel (i.e. doesn't change the data)");
578  setIcon(QIcon(":/images/Resize.png"));
579 
580  addParm("X (µm)","X (µm)","1.0");
581  addParm("Y (µm)","Y (µm)","1.0");
582  addParm("Z (µm)","Z (µm)","1.0");
583  }
584 
585  bool run()
586  {
587  if(!checkState().stack(STORE_NON_EMPTY))
588  return false;
589  Stack* s = currentStack();
590  Point3f nv(parm("X (µm)").toFloat(), parm("Y (µm)").toFloat(), parm("Z (µm)").toFloat());
591  return run(s, nv);
592  }
593 
594  bool run(Stack* stack, Point3f nv);
595  };
596 
602  class mgxBase_EXPORT ResizeCanvas : public Process
603  {
604  public:
605  ResizeCanvas(const Process& process) : Process(process)
606  {
607  setName("Stack/Canvas/Resize Canvas");
608  setDesc("Resize the stack to add or remove voxels.Make sure BBox is checked on before running.");
609  setIcon(QIcon(":/images/Resize.png"));
610 
611  addParm("Relative","If true, X, Y and Z are given in percentage, if false in voxels.","Yes", booleanChoice());
612  addParm("Center","New canvas centered as the old one, or else use the bottom left corner as reference.","Yes", booleanChoice());
613  addParm("X","Canvas size for X direction, in percentage or voxels.","0");
614  addParm("Y","Canvas size for Y direction, in percentage or voxels.","0");
615  addParm("Z","Canvas size for Z direction, in percentage or voxels.","0");
616  }
617 
618  bool run()
619  {
620  if(!checkState().stack(STORE_NON_EMPTY))
621  return false;
622  Stack* s = currentStack();
623  Point3i ds(parm("X").toInt(), parm("Y").toInt(), parm("Z").toInt());
624  return run(s, stringToBool(parm("Relative")), stringToBool(parm("Center")), ds);
625  }
626 
627  bool run(Stack* stack, bool isRelative, bool center, Point3i ds);
628  };
629 
635  class mgxBase_EXPORT ScaleStack : public Process
636  {
637  public:
638  ScaleStack(const Process& process) : Process(process)
639  {
640  setName("Stack/Canvas/Scale Stack");
641  setDesc("Scale the stack.");
642  setIcon(QIcon(":/images/Scale.png"));
643 
644  addParm("Percent","Percent","Yes", QStringList() << "Yes" << "No");
645  addParm("X","X","0.0");
646  addParm("Y","Y","0.0");
647  addParm("Z","Z","0.0");
648  }
649 
650  bool run()
651  {
652  if(!checkState().stack(STORE_NON_EMPTY))
653  return false;
654  Stack* s = currentStack();
655  Point3f newsize(parm("X").toFloat(), parm("Y").toFloat(), parm("Z").toFloat());
656  return run(s, newsize, stringToBool(parm("Percent")));
657  }
658 
659  bool run(Stack* stack, Point3f newsize, bool percent);
660  };
661 
668  class mgxBase_EXPORT ShiftStack : public Process
669  {
670  public:
671  ShiftStack(const Process& process) : Process(process)
672  {
673  setName("Stack/Canvas/Shift Stack");
674  setDesc("Shift both stores of the stack to within the canvas.");
675  setIcon(QIcon(":/images/Shift.png"));
676 
677  addParm("Origin","Origin","No", booleanChoice());
678  addParm("X","X","0");
679  addParm("Y","Y","0");
680  addParm("Z","Z","0");
681  }
682 
683  bool run()
684  {
685  if(!checkState().store(STORE_NON_EMPTY))
686  return false;
687  Stack* s = currentStack();
688  Point3i ds(parm("X").toInt(), parm("Y").toInt(), parm("Z").toInt());
689  return run(s, stringToBool(parm("Origin")), ds);
690  }
691 
692  bool run(Stack* stack, bool origin, Point3i ds);
693  };
694 
701  class mgxBase_EXPORT StackRelabel : public Process
702  {
703  public:
704  StackRelabel(const Process& process) : Process(process)
705  {
706  setName("Stack/Segmentation/Relabel");
707  setDesc("Relabel a 3D stack to use consecutive labels. The cells are shuffled so each relabling will be different.");
708  setIcon(QIcon(":/images/Relabel.png"));
709 
710  addParm("StartLabel","StartLabel","1");
711  addParm("Step","Step","1");
712  }
713 
714  bool run()
715  {
716  if(!checkState().store(STORE_NON_EMPTY | STORE_LABEL))
717  return false;
718  Stack* s = currentStack();
719  Store* store = s->currentStore();
720  Store* output = s->work();
721  int start = parm("StartLabel").toInt();
722  int step = parm("Step").toInt();
723  if(run(s, store, output, start, step)) {
724  store->hide();
725  output->show();
726  return true;
727  }
728  return false;
729  }
730 
731  bool run(Stack* stack, const Store* store, Store* output, int start, int step);
732  };
733 
742  class mgxBase_EXPORT StackRelabelFromMesh : public Process
743  {
744  public:
745  StackRelabelFromMesh(const Process& process) : Process(process)
746  {
747  setName("Stack/Mesh Interaction/Relabel From Mesh");
748  setDesc("Relabel a 3D stack reusing the same labels as in the stack.\n"
749  "Unknown cells (i.e. cells in the stack, not in the mesh), \n"
750  "can be either kept or deleted. If kept, they will be relabeled\n"
751  "to not conflict with existing cells.");
752  setIcon(QIcon(":/images/Relabel.png"));
753 
754  addParm("Delete unknown", "Delete unknown", "Yes", booleanChoice());
755  }
756 
757  bool run()
758  {
759  if(!checkState().store(STORE_NON_EMPTY | STORE_LABEL).mesh(MESH_NON_EMPTY | MESH_LABEL))
760  return false;
761  Stack* s = currentStack();
762  Store* store = s->currentStore();
763  Store* output = s->work();
764  const Mesh* m = currentMesh();
765  if(run(s, store, output, m, stringToBool(parm("Delete unknown")))) {
766  store->hide();
767  output->show();
768  return true;
769  }
770  return false;
771  }
772 
773  bool run(Stack* stack, const Store* store, Store* output, const Mesh* mesh,
774  bool delete_unknown);
775 
776  };
777 
783  class mgxBase_EXPORT DeleteOutsideMesh : public Process
784  {
785  public:
786  DeleteOutsideMesh(const Process& process) : Process(process)
787  {
788  setName("Stack/Mesh Interaction/Delete Outside Mesh");
789  setDesc("Delete labels outside a mesh of 3D cells based on a threshold distance from the centers.");
790  setIcon(QIcon(":/images/Relabel.png"));
791 
792  addParm("Threshold", "Threshold Distance (um)", "1");
793  }
794 
795  bool run()
796  {
797  Stack* stack = currentStack();
798  if(!stack)
799  throw QString("%1::run No current stack").arg(name());
800 
801  Store* input = stack->currentStore();
802  if(!input)
803  throw QString("%1::run No current store").arg(name());
804 
805  if(!input->labels())
806  throw QString("%1::run Store must be labeled").arg(name());
807 
808  Store* output = stack->work();
809  const Mesh* mesh = currentMesh();
810  if(!mesh)
811  throw QString("%1::run No current mesh").arg(name());
812  if(run(stack, input, output, mesh, parm("Threshold").toDouble())) {
813  input->hide();
814  output->show();
815  return true;
816  }
817  return false;
818  }
819 
820  bool run(Stack* stack, const Store* input, Store* output, const Mesh* mesh, double threshold);
821  };
822 
828  class mgxBase_EXPORT SaveTransform : public Process
829  {
830  Q_OBJECT
831 
832  public:
833  SaveTransform(const Process& process) : Process(process)
834  {
835  setName("Stack/Transform/Save Transform");
836  setDesc("Save the frame matrix (or transform if trans checked) to a file");
837  setIcon(QIcon(":/images/save.png"));
838 
839  addParm("Filename","Filename",""); // 0
840  }
841 
842  bool initialize(QWidget* parent);
843 
844  bool run() {
845  return run(currentStack(), parm("Filename"));
846  }
847 
848  bool run(Stack* stack, const QString& filename);
849 
850  };
851 
857  class mgxBase_EXPORT LoadTransform : public Process
858  {
859  Q_OBJECT
860 
861  public:
862  LoadTransform(const Process& process) : Process(process)
863  {
864  setName("Stack/Transform/Load Transform");
865  setDesc("Save the frame matrix (or transform if trans checked) from a file");
866  setIcon(QIcon(":/images/open.png"));
867 
868  addParm("Filename","Filename","");
869  }
870 
871  bool initialize(QWidget* parent);
872 
873  bool run() {
874  return run(currentStack(), parm("Filename"));
875  }
876 
877  bool run(Stack* stack, const QString& filename);
878  };
880 
886  class mgxBase_EXPORT DistanceStackToMesh : public Process
887  {
888  public:
889  DistanceStackToMesh(const Process& process) : Process(process)
890  {
891  setName("Stack/Mesh Interaction/Distance Stack to Mesh");
892  setDesc("Fills the work stack with voxel values according to their distance to the current mesh");
893  setIcon(QIcon(":/images/MeshDistance.png"));
894 
895  addParm("Distance Multiplier","The distance in um is multiplied by this value and rounded to the nearest integer. \n"
896  "This is done to increase the range of the values and to provide a higher accuracy.","10.0");
897  }
898 
899  //bool initialize(QWidget* parent);
900 
901  bool run()
902  {
903  Stack* s1 = currentStack();
904  Store* store1 = s1->main();
905  Store* store2 = s1->work();
906  Mesh* m = currentMesh();
907  return run(s1, store1, store2, m, parm("Distance Multiplier").toDouble());
908  }
909  bool run(Stack* s1, Store* store1, Store* store2, Mesh* m, double mult);
910 
911  };
912 
913  std::set<int> mgxBase_EXPORT findNeighborsLabel(Store* store, Point3i imgSize, Point3i p, int radius = 1);
914 }
915 
916 #endif
mgx::StackRelabel
Definition: StackProcess.hpp:701
mgx::SwapStacks::run
bool run()
Runs the process.
Definition: StackProcess.hpp:511
mgx::ScaleStack::ScaleStack
ScaleStack(const Process &process)
Definition: StackProcess.hpp:638
mgx::ClearMainStack::ClearMainStack
ClearMainStack(const Process &process)
Definition: StackProcess.hpp:226
mgx::uint
unsigned int uint
Definition: Geometry.hpp:41
mgx::ChangeVoxelSize
Definition: StackProcess.hpp:571
mgx::ClearMainStack
Definition: StackProcess.hpp:223
Process.hpp
mgx::CopySwapStacks::CopySwapStacks
CopySwapStacks(const Process &process)
Definition: StackProcess.hpp:349
mgx::FillStackToMesh::run
bool run()
Runs the process.
Definition: StackProcess.hpp:434
mgx::ApplyTransferFunction
Definition: StackProcess.hpp:110
mgx::ScaleStack
Definition: StackProcess.hpp:635
mgx::StackMeshProcess::run
bool run(bool fill)
Definition: StackProcess.hpp:393
mgx::AutoScaleStack::run
bool run()
Runs the process.
Definition: StackProcess.hpp:85
mgx::Stack::work
const Store * work() const
Access the work store.
Definition: Stack.hpp:101
mgx::Store::labels
bool labels() const
Returns true if the data is to be interpreted as labels rather than intensities.
Definition: Store.hpp:70
mgx::ClipStack::ClipStack
ClipStack(const Process &process)
Definition: StackProcess.hpp:254
mgx::TrimStackProcess
Definition: StackProcess.hpp:444
mgx::ClearWorkStack::run
bool run()
Runs the process.
Definition: StackProcess.hpp:208
mgx::Stack::currentStore
const Store * currentStore() const
Returns the current store.
Definition: Stack.hpp:120
mgx::AutoScaleStack
Definition: StackProcess.hpp:80
mgx::ChangeVoxelSize::ChangeVoxelSize
ChangeVoxelSize(const Process &process)
Definition: StackProcess.hpp:574
mgx::DeleteOutsideMesh
Definition: StackProcess.hpp:783
mgx::CopySwapStacks
Definition: StackProcess.hpp:346
mgx::ApplyTransferFunction::ApplyTransferFunction
ApplyTransferFunction(const Process &process)
Definition: StackProcess.hpp:113
mgx::ShiftStack
Definition: StackProcess.hpp:668
mgx::Stack::main
const Store * main() const
Access the main store.
Definition: Stack.hpp:82
mgx::ReverseStack
Definition: StackProcess.hpp:531
mgx::Stack
Definition: Stack.hpp:33
mgx::StackMeshProcess::StackMeshProcess
StackMeshProcess(const Process &process)
Definition: StackProcess.hpp:382
mgx::ShiftStack::ShiftStack
ShiftStack(const Process &process)
Definition: StackProcess.hpp:671
mgx
Distributed matrix library.
Definition: Assert.hpp:26
mgx::Store::hide
void hide()
Ask the user interface to hide this store.
Definition: Store.hpp:167
mgx::ScaleStack::run
bool run()
Runs the process.
Definition: StackProcess.hpp:650
mgx::FillStackToMesh
Definition: StackProcess.hpp:420
mgx::CopyWorkToMain
Definition: StackProcess.hpp:315
mgx::DistanceStackToMesh
Definition: StackProcess.hpp:886
mgx::FillStackToMesh::FillStackToMesh
FillStackToMesh(const Process &process)
Definition: StackProcess.hpp:423
mgx::FillStack3D::run
bool run()
Runs the process.
Definition: StackProcess.hpp:476
mgx::ClipStack::run
bool run()
Runs the process.
Definition: StackProcess.hpp:262
mgx::StackRelabelFromMesh::StackRelabelFromMesh
StackRelabelFromMesh(const Process &process)
Definition: StackProcess.hpp:745
mgx::Process
Definition: Process.hpp:219
mgx::Annihilate
Definition: StackProcess.hpp:30
mgx::SwapStacks
Definition: StackProcess.hpp:501
mgx::BlobDetect::BlobDetect
BlobDetect(const Process &process)
Definition: StackProcess.hpp:163
mgx::stringToBool
mgx_EXPORT bool stringToBool(const QString &string)
Helper function converting a string into a boolean.
mgx::ReverseStack::ReverseStack
ReverseStack(const Process &process)
Definition: StackProcess.hpp:534
mgx::ClearMainStack::run
bool run()
Runs the process.
Definition: StackProcess.hpp:236
mgx::StackRelabel::StackRelabel
StackRelabel(const Process &process)
Definition: StackProcess.hpp:704
mgx::LoadTransform::run
bool run()
Runs the process.
Definition: StackProcess.hpp:873
mgx::TrimStackProcess::run
bool run()
Runs the process.
Definition: StackProcess.hpp:456
mgx::ClearWorkStack
Definition: StackProcess.hpp:195
mgx::TrimStackProcess::TrimStackProcess
TrimStackProcess(const Process &process)
Definition: StackProcess.hpp:447
mgx::Annihilate::Annihilate
Annihilate(const Process &process)
Definition: StackProcess.hpp:33
mgx::ShiftStack::run
bool run()
Runs the process.
Definition: StackProcess.hpp:683
mgx::CopySwapStacks::run
bool run()
Runs the process.
Definition: StackProcess.hpp:359
mgx::ApplyTransferFunction::run
bool run()
Runs the process.
Definition: StackProcess.hpp:125
mgx::Store::show
void show()
Ask the user interface to show this store.
Definition: Store.hpp:162
mgx::LoadTransform::LoadTransform
LoadTransform(const Process &process)
Definition: StackProcess.hpp:862
mgx::CopyWorkToMain::CopyWorkToMain
CopyWorkToMain(const Process &process)
Definition: StackProcess.hpp:318
mgx::findNeighborsLabel
std::set< int > mgxBase_EXPORT findNeighborsLabel(Store *store, Point3i imgSize, Point3i p, int radius=1)
mgx::Annihilate::run
bool run()
Runs the process.
Definition: StackProcess.hpp:45
mgx::FillStack3D::FillStack3D
FillStack3D(const Process &process)
Definition: StackProcess.hpp:469
mgx::DeleteOutsideMesh::DeleteOutsideMesh
DeleteOutsideMesh(const Process &process)
Definition: StackProcess.hpp:786
mgx::Mesh
Definition: Mesh.hpp:54
mgx::SaveTransform
Definition: StackProcess.hpp:828
mgx::LoadTransform
Definition: StackProcess.hpp:857
mgx::CopyWorkToMain::run
bool run()
Runs the process.
Definition: StackProcess.hpp:325
mgx::DeleteOutsideMesh::run
bool run()
Runs the process.
Definition: StackProcess.hpp:795
mgx::CopyMainToWork::run
bool run()
Runs the process.
Definition: StackProcess.hpp:294
mgx::BlobDetect
Definition: StackProcess.hpp:160
mgx::Store::setLabels
void setLabels(bool val)
Change the interpretation of the volume as labels.
Definition: Store.hpp:75
mgx::Vector< 3, float >
mgx::FillStack3D
Definition: StackProcess.hpp:466
mgx::CopyMainToWork
Definition: StackProcess.hpp:284
mgx::ClipStack
Definition: StackProcess.hpp:251
mgx::Point3i
Vector< 3, int > Point3i
Definition: Geometry.hpp:68
mgx::StackRelabelFromMesh
Definition: StackProcess.hpp:742
mgx::SaveTransform::run
bool run()
Runs the process.
Definition: StackProcess.hpp:844
mgx::CopyMainToWork::CopyMainToWork
CopyMainToWork(const Process &process)
Definition: StackProcess.hpp:287
mgx::ResizeCanvas::ResizeCanvas
ResizeCanvas(const Process &process)
Definition: StackProcess.hpp:605
mgx::StackRelabel::run
bool run()
Runs the process.
Definition: StackProcess.hpp:714
mgx::ResizeCanvas
Definition: StackProcess.hpp:602
mgx::SwapStacks::SwapStacks
SwapStacks(const Process &process)
Definition: StackProcess.hpp:504
mgx::DistanceStackToMesh::DistanceStackToMesh
DistanceStackToMesh(const Process &process)
Definition: StackProcess.hpp:889
mgx::ClearWorkStack::ClearWorkStack
ClearWorkStack(const Process &process)
Definition: StackProcess.hpp:198
mgx::ResizeCanvas::run
bool run()
Runs the process.
Definition: StackProcess.hpp:618
mgx::SaveTransform::SaveTransform
SaveTransform(const Process &process)
Definition: StackProcess.hpp:833
mgx::StackMeshProcess
Definition: StackProcess.hpp:379
mgx::Process::run
virtual bool run()
Runs the process.
Definition: Process.hpp:579
mgx::DistanceStackToMesh::run
bool run()
Runs the process.
Definition: StackProcess.hpp:901
mgx::StackRelabelFromMesh::run
bool run()
Runs the process.
Definition: StackProcess.hpp:757
mgx::ChangeVoxelSize::run
bool run()
Runs the process.
Definition: StackProcess.hpp:585
mgx::AutoScaleStack::AutoScaleStack
AutoScaleStack(const Process &process)
Definition: StackProcess.hpp:83
mgx::BlobDetect::run
bool run()
Runs the process.
Definition: StackProcess.hpp:173
mgx::ReverseStack::run
bool run()
Runs the process.
Definition: StackProcess.hpp:545
mgx::Store
Definition: Store.hpp:33