3
* $Id: comandochroma.h 3521 2011-03-16 14:54:22Z carlos $
6
* Copyright 2008-10 MetaEmotion S.L. All rights reserved.
7
* http://ginkgo-cadx.com
9
* This file is licensed under LGPL v3 license.
10
* See License.txt for details
14
//#define _GINKGO_TRACE
15
#include <api/globals.h>
16
#include <api/icomando.h>
21
#include <vtkSmartPointer.h>
22
#include <vtkImageData.h>
24
class wxCriticalSection;
25
class vtkGinkgoImageViewer;
27
class INotificadorChroma;
39
typedef enum TipoAccion {
44
TAC_CancelarSegmentacion,
50
typedef enum TipoAmbito {
69
TipoPunto(unsigned long uid, float x, float y, float z) {
76
inline friend std::ostream & operator <<(std::ostream& out, const TipoPunto& c) {
77
out << "[ x = " << c.coord[0] << ", y = " << c.coord[1] << ", UID = " << c.UID << " ]";
82
inline friend std::ostream & operator <<(std::ostream& out, TipoPunto* c) {
95
MASCARA_SET_CHROMA = 0x80, //un uno en el chroma
96
MASCARA_SET_PRESELECCION = 0x40, //un uno en la preseleccion
97
MASCARA_UNSET_CHROMA = 0x7F, //un cero en el chroma
98
MASCARA_UNSET_PRESELECCION = 0xBF //un cero en la preseleccion
102
class ComandoChromaParams : public GNC::GCS::IComandoParams {
104
typedef std::list<GNC::GCS::Nodo> TVerticesLazo;
106
ComandoChromaParams( GNC::GCS::IElementoCache* pImagen,
107
vtkSmartPointer<vtkImageData> pMapaValoracion,
108
GADAPI::Chroma::TipoAccion tipoAccion,
109
wxCriticalSection* pMEF_CriticalSection,
110
INotificadorChroma* pNotificador,
112
GADAPI::Chroma::TipoAmbito tipoAmbito = GADAPI::Chroma::TAC_Contiguo);
114
ComandoChromaParams( GNC::GCS::IElementoCache* pImagen,
115
vtkSmartPointer<vtkImageData> pMapaValoracion,
116
wxCriticalSection* pMEF_CriticalSection,
117
INotificadorChroma* pNotificador,
118
const TVerticesLazo& vertices, vtkGinkgoImageViewer* pVista);
120
virtual ~ComandoChromaParams();
124
GNC::GCS::IElementoCache* m_pImagen;
125
vtkSmartPointer<vtkImageData> m_pMapaValoracion;
126
wxCriticalSection* m_pMEFCriticalSection;
127
INotificadorChroma* m_pNotificador;
128
float m_sensibilidad;
130
GADAPI::Chroma::TipoAccion m_TipoAccion;
131
GADAPI::Chroma::TipoAmbito m_TipoAmbito;
137
TVerticesLazo m_Vertices;
138
vtkGinkgoImageViewer* m_pVista;
141
class ComandoChromaResult : public GNC::GCS::IComandoResult {
143
ComandoChromaResult() {
148
class ComandoChroma : public GNC::GCS::IComando {
150
ComandoChroma(ComandoChromaParams* pParams);
157
ComandoChromaParams* m_pChromaParams;