1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 #include "bbmaracasvisuContourCrown.h"
27 #include "bbcreaMaracasVisuPackage.h"
29 #include <vtkImageData.h>
31 namespace bbcreaMaracasVisu
34 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ContourCrown)
35 BBTK_BLACK_BOX_IMPLEMENTATION(ContourCrown,bbtk::WxBlackBox);
37 //-----------------------------------------------------------
38 void ContourCrown::Process()
44 if (bbGetInputwxVtkBaseView()==NULL)
46 wxMessageDialog(NULL, bbtk::std2wx("(ContourCrown) Input 'wxVtkBaseView' is not set"), bbtk::std2wx(bbGetFullName()) ).ShowModal();
48 if (bbGetInputIn()==NULL)
50 wxMessageDialog(NULL, bbtk::std2wx("(ContourCrown) Input 'In' is not set"), bbtk::std2wx(bbGetFullName()) ).ShowModal();
53 mwxwidget->Init( bbGetInputwxVtkBaseView(), bbGetInputIn() );
54 mwxwidget->ConfigureVTK();
56 bbSetOutputImageValueResult( mwxwidget->GetVtkImageValueResult() );
57 bbSetOutputImageMaskResult( mwxwidget->GetVtkImageMaskResult() );
63 mwxwidget->SetControlPoints( bbGetInputControlPointsInX(), bbGetInputControlPointsInY(), bbGetInputControlPointsInZ() );
68 mwxwidget->GetValuesInsideCrown(&LstValue,&LstValuePosX,&LstValuePosY,&LstValuePosZ);
70 //JSTG 226-02-08 ----------------------------------------------------------
74 mwxwidget->GetSplinePoints(&LstContourX,&LstContourY,&LstContourZ);
75 //-------------------------------------------------------------------------
77 bbSetOutputLstValue(&LstValue);
78 bbSetOutputLstValuePosX(&LstValuePosX);
79 bbSetOutputLstValuePosY(&LstValuePosY);
80 bbSetOutputLstValuePosZ(&LstValuePosZ);
81 bbSetOutputLstContourX(&LstContourX);
82 bbSetOutputLstContourY(&LstContourY);
83 bbSetOutputLstContourZ(&LstContourZ);
84 bbSetOutputLstContourCrlX(&LstContourCrlX);
85 bbSetOutputLstContourCrlY(&LstContourCrlY);
86 bbSetOutputLstContourCrlZ(&LstContourCrlZ);
87 bbSetOutputLstContourCrlZ(&LstContourCrlZ);
91 //-----------------------------------------------------------
92 void ContourCrown::CreateWidget(wxWindow* parent)
94 bbtkDebugMessageInc("Core",9,"ContourCrown::CreateWidget()"<<std::endl);
96 mwxwidget = new wxMaracasCoutourTool( parent );
97 bbSetOutputWidget( mwxwidget );
98 bbtkDebugDecTab("Core",9);
101 //-----------------------------------------------------------
102 void ContourCrown::bbUserSetDefaultValues()
107 bbSetInputwxVtkBaseView(NULL);
108 //JSTG 26-02-08 ------------------------------------
109 bbSetInputControlPointsInX(NULL);
110 bbSetInputControlPointsInY(NULL);
111 bbSetInputControlPointsInZ(NULL);
112 //--------------------------------------------------
115 //-----------------------------------------------------------------
116 void ContourCrown::bbUserInitializeProcessing()
120 //-----------------------------------------------------------------
121 void ContourCrown::bbUserFinalizeProcessing()
125 //-----------------------------------------------------------------
129 // EO namespace bbcreaMaracasVisu