// (the one provided in the attribute 'type' of the tag 'input')
- OpenLoadImageDialog diag = OpenLoadImageDialog();
+ creaMaracasVisuKernel::OpenImageDialog diag = creaMaracasVisuKernel::OpenImageDialog();
#include "bbcreaMaracasVisu_EXPORT.h"
#include "bbtkAtomicBlackBox.h"
#include "iostream"
-#include "OpenLoadImageDialog.h"
+#include "OpenImageDialog.h"
namespace bbcreaMaracasVisu
{
--- /dev/null
+
+#include "OpenImageDialog.h"
+
+typedef vtkImageData* (*GETIMAGEDATADIALOG)();
+
+namespace creaMaracasVisuKernel{
+ OpenImageDialog::OpenImageDialog()
+ {
+
+
+ img = NULL;
+ bool gimmicknotfound = true;
+
+ #ifdef WIN32
+ HINSTANCE gimmickhandle;
+ gimmickhandle = LoadLibrary(TEXT("creaImageIO2.dll"));
+ std::cout<<"imagehandle "<<gimmickhandle<<std::endl;
+ if(gimmickhandle!=NULL){
+
+
+ GETIMAGEDATADIALOG getImageDataDialog;
+
+ getImageDataDialog = (GETIMAGEDATADIALOG)GetProcAddress(gimmickhandle, "getImageDataDialog");
+
+
+ std::cout<<"imagedatadialog "<<getImageDataDialog<<std::endl;
+
+ if(getImageDataDialog!=NULL){
+ img = getImageDataDialog();
+ gimmicknotfound = false;
+ }
+ }
+
+ #endif
+
+ if(gimmicknotfound){
+
+ wxFileDialog* FD =
+ new wxFileDialog( 0, _T("Read Image"),wxEmptyString,wxEmptyString, _T("*.mhd"));
+
+ if (FD->ShowModal()==wxID_OK)
+ {
+ std::string path= FD->GetPath();
+
+ vtkMetaImageReader *reader = vtkMetaImageReader::New();
+ reader->SetFileName(path.c_str());
+ img = reader->GetOutput();
+ }
+ }
+
+
+
+ }
+
+ //-------------------------------------------------------------------
+ OpenImageDialog::~OpenImageDialog()
+ {
+ }
+
+ vtkImageData* OpenImageDialog::getImageData(){
+ return img;
+ }
+}
+
--- /dev/null
+#ifndef OpenImageDialog_H_
+#define OpenImageDialog_H_
+
+#include "marTypes.h"
+#include "vtkImageData.h"
+#include "vtkMetaImageReader.h"
+#include "wx/wx.h"
+
+namespace creaMaracasVisuKernel{
+
+class creaMaracasVisu_EXPORT OpenImageDialog {
+public:
+ OpenImageDialog();
+ ~OpenImageDialog();
+
+
+ vtkImageData* getImageData();
+protected:
+
+private:
+ vtkImageData* img;
+
+};
+
+}
+
+#endif /*OpenImageDialog_H_*/
+++ /dev/null
-
-#include "OpenLoadImageDialog.h"
-
-typedef vtkImageData* (*GETIMAGEDATADIALOG)();
-
-OpenLoadImageDialog::OpenLoadImageDialog()
-{
-
-
- img = NULL;
- bool gimmicknotfound = true;
-
-#ifdef WIN32
- HINSTANCE gimmickhandle;
- gimmickhandle = LoadLibrary(TEXT("creaImageIO2.dll"));
- if(gimmickhandle!=NULL){
-
-
- GETIMAGEDATADIALOG getImageDataDialog;
-
- getImageDataDialog = (GETIMAGEDATADIALOG)GetProcAddress(gimmickhandle, "getImageDataDialog");
-
- std::cout<<"imagehandle "<<gimmickhandle<<std::endl;
- std::cout<<"imagedatadialog "<<getImageDataDialog<<std::endl;
-
- if(getImageDataDialog!=NULL){
- img = getImageDataDialog();
- gimmicknotfound = false;
- }
- }
-
-#endif
-
- if(gimmicknotfound){
-
- wxFileDialog* FD =
- new wxFileDialog( 0, _T("Read Image"),wxEmptyString,wxEmptyString, _T("*.mhd"));
-
- if (FD->ShowModal()==wxID_OK)
- {
- std::string path= FD->GetPath();
-
- vtkMetaImageReader *reader = vtkMetaImageReader::New();
- reader->SetFileName(path.c_str());
- img = reader->GetOutput();
- }
- }
-
-
-
-}
-
-//-------------------------------------------------------------------
-OpenLoadImageDialog::~OpenLoadImageDialog()
-{
-}
-
-vtkImageData* OpenLoadImageDialog::getImageData(){
- return img;
-}
\ No newline at end of file
+++ /dev/null
-#ifndef OpenLoadImageDialog_H_
-#define OpenLoadImageDialog_H_
-
-#include "marTypes.h"
-#include "vtkImageData.h"
-#include "vtkMetaImageReader.h"
-#include "wx/wx.h"
-
-
-
-class creaMaracasVisu_EXPORT OpenLoadImageDialog {
-public:
- OpenLoadImageDialog();
- ~OpenLoadImageDialog();
-
-
- vtkImageData* getImageData();
-protected:
-
-private:
- vtkImageData* img;
-
-};
-
-#endif /*OpenLoadImageDialog_H_*/
#include "wxMaracasSurfaceRenderingManagerDataMhd.h"
+
#include "vtkStripper.h"
wxMaracasSurfaceRenderingManagerDataMhd::wxMaracasSurfaceRenderingManagerDataMhd(vtkImageData* imagedata, std::string dataname, vtkRenderWindowInteractor* interactor)
_dataMapper = vtkPolyDataMapper::New( );
_dataMapper->ScalarVisibilityOff( );
_dataMapper->ImmediateModeRenderingOn();
+ vtkActor* dataActor = vtkActor::New();
- if(_boxWidgetS1){
+ if(interactor){
_boxWidgetS1 = vtkBoxWidget::New();
_boxWidgetS1->SetInteractor( interactor );
_boxWidgetS1->SetInput( this->_imagedata );
_boxWidgetS1->PlaceWidget();
- //_boxWidgetS1->AddObserver( vtkCommand::InteractionEvent , _vtkclipping3Ddataviewer->GetObserverS(i) );
+ boxSurfaceObserver* observer = boxSurfaceObserver::New();
+
_boxWidgetS1->HandlesOn ();
- _boxWidgetS1->Off();
+ _boxWidgetS1->On();
vtkStripper* striper = vtkStripper::New();
striper->SetInput( _cleanFilter->GetOutput() );
this->_imagedata->GetExtent(x1,x2,y1,y2,z1,z2);
_tissuePlanes->SetBounds (x1,x2,y1,y2,z1,z2);
+
+
_boxWidgetS1->GetPlanes( _tissuePlanes );
_tissueClipper = vtkClipPolyData::New();
_tissueClipper->SetClipFunction( _tissuePlanes );
_tissueClipper->InsideOutOn( );
_dataMapper->SetInput( _tissueClipper->GetOutput() );
+ observer->SetPlanes( _tissuePlanes );
+ observer->SetActor( dataActor );
+ _boxWidgetS1->AddObserver( vtkCommand::InteractionEvent , observer );
+
+
}else{
- _dataMapper->SetInput(_cleanFilter->GetOutput());
-
+ _dataMapper->SetInput(_cleanFilter->GetOutput());
}
- vtkActor* dataActor = vtkActor::New();
+
dataActor->SetMapper(_dataMapper);
this->_prop3D = dataActor;
+
this->changeIsoValue(this->_maxgreylevel);
#include "wxMaracasSurfaceRenderingManagerData.h"
+#include "boxSurfaceObserver.h"
#include "vtkMetaImageReader.h"
#include "vtkMarchingCubes.h"