GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
QGoSplitSegmentationAlgo.h
Go to the documentation of this file.
1 
2 /*=========================================================================
3  Authors: The GoFigure Dev. Team.
4  at Megason Lab, Systems biology, Harvard Medical school, 2009-11
5 
6  Copyright (c) 2009-11, President and Fellows of Harvard College.
7  All rights reserved.
8 
9  Redistribution and use in source and binary forms, with or without
10  modification, are permitted provided that the following conditions are met:
11 
12  Redistributions of source code must retain the above copyright notice,
13  this list of conditions and the following disclaimer.
14  Redistributions in binary form must reproduce the above copyright notice,
15  this list of conditions and the following disclaimer in the documentation
16  and/or other materials provided with the distribution.
17  Neither the name of the President and Fellows of Harvard College
18  nor the names of its contributors may be used to endorse or promote
19  products derived from this software without specific prior written
20  permission.
21 
22  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
26  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
27  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
28  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
29  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
31  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
32  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 
34 =========================================================================*/
35 #ifndef __QGoSplitSegmentationAlgo_h
36 #define __QGoSplitSegmentationAlgo_h
37 
38 #include "QGoSegmentationAlgo.h"
39 #include "QGoAlgorithmWidget.h"
40 #include "QGoGUILibConfigure.h"
41 #include "vtkSmartPointer.h"
42 #include "vtkPolyData.h"
43 #include "vtkImageData.h"
44 #include "QGoGUILibConfigure.h"
45 
46 class GoImageProcessor;
47 
53 class QGOGUILIB_EXPORT QGoSplitSegmentationAlgo:public QGoSegmentationAlgo
54 {
55  Q_OBJECT
56 public:
57  explicit QGoSplitSegmentationAlgo(std::vector< vtkPoints* >* iSeeds, QWidget *iParent = 0);
58  virtual ~QGoSplitSegmentationAlgo();
59 
60 
64  virtual std::vector<vtkPolyData*> ApplyAlgo(
65  GoImageProcessor* iImages,
66  std::string iChannel,
67  std::vector<vtkPolyData*> iPolyData,
68  bool iIsInvertedOn = false) = 0;
69 
70 protected:
71  std::vector< vtkPoints* >* m_Seeds;
73 
77  virtual void SetAlgoWidget(QWidget* iParent = 0);
78 
79 
83  virtual void DeleteParameters() = 0;
84 
85  /*
86  * \brief Get boundingBox from a center and a radius
87  * \param[in] iCenter center of the box
88  * \param[in] iRadius radius of the box
89  * \param[in] iOrientation 0-xy, 1-xz, 2-yz, 3-xyz
90  * \return vector[6] containing the bounding box (xmin, xmax, ymin, imax, ...)
91  */
92  std::vector<double> GetBounds(
93  const std::vector<double>& iCenter,
94  const double& iRadius,
95  const unsigned int& iOrientation = 3);
96 
97 };
98 
99 #endif
QGoAlgoParameter< double > * m_Radius
virtual void SetAlgoWidget(QWidget *iParent=0)=0
construct the algowidget with the different parameters
virtual void DeleteParameters()=0
delete the different parameters
abstract class to be the interface between the algorithms for meshes and contours and GoFigure ...
abstract class to be the interface between the semi automatic algorithms for meshes and contours and ...
std::vector< vtkPoints * > * m_Seeds
Interface between image reader and vtkImageData.