#FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h")
# OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND
+
FILE(GLOB ${LIBRARY_NAME}_HEADERS_WXWIN "src/interface/wxWindows/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_WXWIN src/interface/wxWindows/*.cxx src/interface/wxWindows/*.cpp src/interface/wxWindows/*.cc)
FILE(GLOB ${LIBRARY_NAME}_HEADERS_KERNEL "src/kernel/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_KERNEL src/kernel/*.cxx src/kernel/*.cpp src/kernel/*.cc)
-FILE(GLOB ${LIBRARY_NAME}_HEADERS_CUTMODULE src/CutModule/interface/*.h src/CutModule/kernel/*.h)
+ FILE(GLOB ${LIBRARY_NAME}_HEADERS_CUTMODULE src/CutModule/interface/*.h src/CutModule/kernel/*.h)
FILE(GLOB ${LIBRARY_NAME}_SOURCES_CUTMODULE src/CutModule/interface/*.cxx src/CutModule/kernel/*.cxx)
-FILE(GLOB ${LIBRARY_NAME}_HEADERS_MARACASVISULIB_INCLUDE include/*.h )
+ FILE(GLOB ${LIBRARY_NAME}_HEADERS_MARACASVISULIB_INCLUDE include/*.h )
SET ( ${LIBRARY_NAME}_HEADERS
${${LIBRARY_NAME}_HEADERS_WXWIN}
${${LIBRARY_NAME}_HEADERS_CBUTTONCONTAINER}
${${LIBRARY_NAME}_HEADERS_CPBUTTONCONTAINER}
${${LIBRARY_NAME}_HEADERS_UNDO_REDO}
-
)
#----------------------------------------------------------------------------
SET(${LIBRARY_NAME}_INSTALL_FOLDER ${LIBRARY_NAME})
SET(${LIBRARY_NAME}_LIBRARIES
-
BaseVolumeRenderer
BaseSurfaceRenderer
KernelVolumeRenderer
#include "LayerImageBase.h"
+#include "wxVtk2DBaseView.h"
+#include "wxVTKRenderWindowInteractor.h"
+
//---------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
ColorLayerImageBasevtkInteractor::ColorLayerImageBasevtkInteractor(LayerImageBase* layerImageBase)
{
+ _state=false;
_layerImageBase=layerImageBase;
+
}
//---------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
-bool ColorLayerImageBasevtkInteractor::OnMouseMove()
+bool ColorLayerImageBasevtkInteractor::OnMouseMove() // vitual
{
printf("EED ColorLayerImageBasevtkInteractor::OnMouseMove \n");
- if (_vtkInteractorStyleBaseView->GetRefresh_waiting()==true)
- {
- _layerImageBase->GetvtkImageReslice()->Modified();
- }
+
+ if (_state==true)
+ {
+
+ wxVtk2DBaseView *wxvtk2Dbaseview = (wxVtk2DBaseView*) _vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
+ wxVTKRenderWindowInteractor *wxVTKiren = wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor();
+ int px, py;
+ wxVTKiren->GetEventPosition(px, py);
- return true;
+// int typeView = 1;
+ double X = (double) px;
+ double Y = (double) py;
+ double Z = wxvtk2Dbaseview->GetActualSlice();
+// wxvtk2Dbaseview->TransFromCoordScreenToWorld(X, Y, Z,true, typeView);
+ wxvtk2Dbaseview->TransFromCoordScreenToWorld(X, Y, Z, true);
+
+// _manualPaintControler->PaintImage((int) X, (int) Y, (int) Z);
+
+ _layerImageBase->SetZ( (int)Z );
+ _layerImageBase->onThreshold();
+// _layerImageBase->Refresh();
+
+
+ this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
+
+ if (_vtkInteractorStyleBaseView->GetRefresh_waiting()==true)
+ {
+ _layerImageBase->GetvtkImageReslice()->Modified();
+ }
+ printf("EED ColorLayerImageBasevtkInteractor::YESSSSSS \n");
+ }
+ return true;
+}
+
+
+bool ColorLayerImageBasevtkInteractor::OnRightButtonDown() // virtual
+{
+ printf("EED ColorLayerImageBasevtkInteractor::OnRightButtonDown \n");
+ _state=true;
+ return true;
+}
+
+bool ColorLayerImageBasevtkInteractor::OnRightButtonUp() // virtual
+{
+ printf("EED ColorLayerImageBasevtkInteractor::OnRightButtonUp \n");
+ _state=false;
+ return true;
}
//----------------------------------------------------------------------------
void LayerImageBase::onThreshold()
{
-
+
printf("EED LayerImageBase::onThreshold start \n");
if ((_image!=NULL) && (_baseView!=NULL))
{
- int z=CleanZ( GetZ() );
+ double spc[3];
+ GetImage()-> GetSpacing(spc);
+ double z = CleanZ( GetZ() );
+ z = z*spc[2];
+
+ printf("EED LayerImageBase::onThreshold z = %d spcZ%f\n" , z, spc[2]);
+
+
if (!GetActorPresent())
{
} // _image
- printf("EED LayerImageBase::onThreshold end");
+ printf("EED LayerImageBase::onThreshold end \n");
}