1 /*=========================================================================
7 =========================================================================*/
9 /* ---------------------------------------------------------------------
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
14 * This software is governed by the CeCILL-B license under French law and
15 * abiding by the rules of distribution of free software. You can use,
16 * modify and/ or redistribute the software under the terms of the CeCILL-B
17 * license as circulated by CEA, CNRS and INRIA at the following URL
18 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
19 * or in the file LICENSE.txt.
21 * As a counterpart to the access to the source code and rights to copy,
22 * modify and redistribute granted by the license, users are provided only
23 * with a limited warranty and the software's author, the holder of the
24 * economic rights, and the successive licensors have only limited
27 * The fact that you are presently reading this means that you have had
28 * knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */
33 * \brief Class bbtk::GConnectorModel
37 #include "GConnectorModel.h"
42 //=========================================================================
44 GConnectorModel::GConnectorModel()
50 //=========================================================================
52 GConnectorModel::~GConnectorModel()
56 //=========================================================================
58 void GConnectorModel::setStartPort(GPortModel* startPort)
60 _startPort = startPort;
62 double xCenter,yCenter,zCenter;
63 startPort->getCenter(xCenter,yCenter,zCenter);
64 double xFport,yFport,zFport;
65 startPort->getFinalPoint(xFport,yFport,zFport);
67 setInicPoint(xCenter,yFport,zCenter);
70 //=========================================================================
72 void GConnectorModel::setEndPort(GPortModel* endPort)
76 double xCenter,yCenter,zCenter;
77 endPort->getCenter(xCenter,yCenter,zCenter);
78 double xIport,yIport,zIport;
79 endPort->getInicPoint(xIport,yIport,zIport);
81 setFinalPoint(xCenter,yIport,zCenter);
83 manualPoint* point = _model->GetManualPoint(_model->GetSizeLstPoints()-1);
84 point->SetPoint(xCenter,yIport,zCenter);
85 cout<<"RaC GConnectorModel::setEndPort size:"<<_model->GetSizeLstPoints()<<endl;
88 //=========================================================================
90 GPortModel* GConnectorModel::getStartPort()
95 //=========================================================================
97 GPortModel* GConnectorModel::getEndPort()
102 //=========================================================================
104 manualContourModel* GConnectorModel::getManualContourModel()
109 //=========================================================================
111 void GConnectorModel::setManualContourModel(manualContourModel* model)
116 //=========================================================================
118 } // EO namespace bbtk