]> Creatis software - bbtk.git/commitdiff
#3212 BBTK Feature New Normal - vtk8itk4wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 13:28:32 +0000 (15:28 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 13:28:32 +0000 (15:28 +0200)
197 files changed:
kernel/appli/bbStudio/CMakeLists.txt
kernel/appli/bbStudio/bbStudio.cxx
kernel/appli/bbfy/bbfy.cpp
kernel/appli/bbi/CMakeLists.txt
kernel/appli/bbi/bbi.cxx
kernel/cmake/BBTKConfigurePackagePaths.cmake
kernel/cmake/BBTKConfigurePackage_data.cmake
kernel/cmake/BBTKConfigurePackage_src.cmake
kernel/cmake/BBTKFindLibraries.cmake
kernel/cmake/BBTKKernelConfig.cmake
kernel/src/CMakeLists.txt
kernel/src/bbtkAtomicBlackBox.cxx
kernel/src/bbtkAtomicBlackBox.h
kernel/src/bbtkAtomicBlackBoxMacros.h
kernel/src/bbtkBlackBox.h
kernel/src/bbtkConfigurationFile.cxx
kernel/src/bbtkDynamicLibraryHandling.h
kernel/src/bbtkException.h
kernel/src/bbtkExecuter.cxx
kernel/src/bbtkFactory.cxx
kernel/src/bbtkInterpreter.cxx
kernel/src/bbtkInterpreterVirtual.cxx
kernel/src/bbtkMessageManager.h
kernel/src/bbtkObject.h
kernel/src/bbtkPackage.cxx
kernel/src/bbtkSystem.h
kernel/src/bbtkUtilities.cxx
kernel/src/bbtkVtkBlackBoxMacros.h
kernel/src/bbtkWxGUICommand.cxx
kernel/src/bbtkWxGUIConsole.cxx
kernel/src/bbtkWxGUIPackageBrowser2.cxx
kernel/src/bbtkWxGUIPackageBrowser2.h
kernel/src/bbtkWxGUITextEditor.cxx
kernel/src/xmlParser.cpp
kernel/src/xmlParser.h
packages/gdcmvtk/bbs/appli/exampleGetInfoGdcmReader.bbg [new file with mode: 0644]
packages/gdcmvtk/bbs/appli/exampleGetInfoGdcmReader.bbs
packages/gdcmvtk/bbs/appli/exampleGetXCoherentInfoGdcmReader.bbg [new file with mode: 0644]
packages/gdcmvtk/bbs/appli/exampleGetXCoherentInfoGdcmReader.bbs
packages/gdcmvtk/data/dicom01/466 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/467 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/468 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/469 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/470 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/471 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/472 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/473 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/474 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/475 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/476 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/477 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/478 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/479 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/480 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/481 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/482 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/483 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/484 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/485 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/486 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/487 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/488 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/489 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/490 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/491 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/492 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/493 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/494 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/495 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/496 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/497 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/498 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/499 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/500 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/501 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/502 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/503 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/504 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/505 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/506 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/507 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/508 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/509 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/510 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/511 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/512 [new file with mode: 0644]
packages/gdcmvtk/data/dicom01/513 [new file with mode: 0644]
packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx
packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
packages/itk/bbs/boxes/bbDICOMDirReader.bbs-OLD-gdcm1.3 [moved from packages/itk/bbs/boxes/bbDICOMDirReader.bbs with 100% similarity]
packages/itk/src/bbitkBinaryThresholdImageFilter.cxx
packages/itk/src/bbitkBinaryThresholdImageFilter.h
packages/itk/src/bbitkDICOMSeriesFileNames.xml-OLD-gdcm1.3 [moved from packages/itk/src/bbitkDICOMSeriesFileNames.xml with 88% similarity]
packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.cxx
packages/itkvtk/src/bbitkvtkitkImageVector2vtkImageDataVector.cxx
packages/itkvtk/src/bbitkvtkvtkImageData2itkImage.cxx
packages/itkvtk/src/itkImageToVTKImageFilter.txx
packages/itkvtk/src/itkVTKImageToImageFilter.txx
packages/std/data/hola.mhd [deleted file]
packages/std/data/hola.raw [deleted file]
packages/vtk/bbs/appli/exampleMagnitud.bbg [new file with mode: 0644]
packages/vtk/bbs/appli/exampleMagnitud.bbs [new file with mode: 0644]
packages/vtk/bbs/appli/exampleReadView_vtkPolyData_1.bbg [new file with mode: 0644]
packages/vtk/bbs/appli/exampleReadView_vtkPolyData_1.bbs
packages/vtk/bbs/appli/exampleReadView_vtkPolyData_2.bbg [new file with mode: 0644]
packages/vtk/bbs/appli/exampleReadView_vtkPolyData_2.bbs
packages/vtk/bbs/appli/exampleSave_vtkPolyData.bbg [new file with mode: 0644]
packages/vtk/bbs/appli/exampleSave_vtkPolyData.bbs
packages/vtk/bbs/boxes/bbLoadHola_vtkPolyData.bbs [deleted file]
packages/vtk/data/testImage.mhd [deleted file]
packages/vtk/src/bbtkSimpleUtilities.h
packages/vtk/src/bbvtkAppendPolyData.xml
packages/vtk/src/bbvtkAutoCrop.cxx
packages/vtk/src/bbvtkAutoCrop.h
packages/vtk/src/bbvtkBinaryOperations.cxx
packages/vtk/src/bbvtkCSVReader.cxx
packages/vtk/src/bbvtkCleanExternalPlane.cxx
packages/vtk/src/bbvtkConcatImages.cxx
packages/vtk/src/bbvtkConeSource.xml
packages/vtk/src/bbvtkCreateImage.cxx
packages/vtk/src/bbvtkExtractVtkImageFilter.cxx
packages/vtk/src/bbvtkFlip.cxx
packages/vtk/src/bbvtkImageBoundaries.cxx
packages/vtk/src/bbvtkImageCastToUShort.cxx
packages/vtk/src/bbvtkImagePlanes.cxx
packages/vtk/src/bbvtkImageVtkProperties.cxx
packages/vtk/src/bbvtkInversCrop.cxx
packages/vtk/src/bbvtkMIPCreator.cxx
packages/vtk/src/bbvtkMIPCreator.h
packages/vtk/src/bbvtkMagnitud.cxx
packages/vtk/src/bbvtkMagnitud.h
packages/vtk/src/bbvtkMaskPoint.cxx
packages/vtk/src/bbvtkMaskPoint.h
packages/vtk/src/bbvtkMetaImageWriter.xml
packages/vtk/src/bbvtkPiecewiseFunction.cxx
packages/vtk/src/bbvtkPiecewiseFunction.h
packages/vtk/src/bbvtkPlaneClipPolyData.cxx
packages/vtk/src/bbvtkPolyDataReaderPlus.cxx
packages/vtk/src/bbvtkPolyDataToActor.cxx
packages/vtk/src/bbvtkPolyDataWriter.xml
packages/vtk/src/bbvtkPolyDataWriterPlus.cxx
packages/vtk/src/bbvtkPolyDataWriterPlus.h
packages/vtk/src/bbvtkProbeFilter.cxx
packages/vtk/src/bbvtkRescaleSlopeIntercept.cxx
packages/vtk/src/bbvtkSegmentationConnectivity.cxx
packages/vtk/src/bbvtkSliceImage.cxx
packages/vtk/src/bbvtkSphereList.cxx
packages/vtk/src/bbvtkSphereList.h
packages/vtk/src/bbvtkSphereSource.xml
packages/vtk/src/bbvtkStructuredPointsReader.cxx
packages/vtk/src/bbvtkSurfaceTexture.cxx
packages/vtk/src/bbvtkTemporalPicker.cxx
packages/vtk/src/bbvtkTemporalPicker.h
packages/vtk/src/bbvtkUnMosaic.cxx
packages/vtk/src/bbvtkUnaryOperations.cxx
packages/vtk/src/bbvtkVecImageGaussianSmooth.cxx
packages/vtk/src/bbvtkVecIsoSurfaceExtractor.cxx
packages/vtk/src/bbvtkVolumeRenderer.cxx
packages/vtk/src/bbvtkVolumeRenderer.h
packages/wx/src/bbwxFileSelector.cxx
packages/wxvtk/bbs/appli/exampleDoubleSlicer.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleDoubleSlicer.bbs
packages/wxvtk/bbs/appli/exampleImagePlanes.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleImagePlanes.bbs
packages/wxvtk/bbs/appli/exampleIsoSurfaceWidget.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleIsoSurfaceWidget.bbs
packages/wxvtk/bbs/appli/exampleMIPWidget.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleMIPWidget.bbs
packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicer.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicer.bbs
packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbs
packages/wxvtk/bbs/appli/exampleView2D3D.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleView2D3D.bbs
packages/wxvtk/bbs/appli/exampleView3DImage1.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleView3DImage1.bbs
packages/wxvtk/bbs/appli/exampleView3DImage1_Stereo.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleView3DImage1_Stereo.bbs
packages/wxvtk/bbs/appli/exampleViewer2D.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleViewer2D.bbs
packages/wxvtk/bbs/appli/exampleViewerInLayoutTab.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleViewerInLayoutTab.bbs
packages/wxvtk/bbs/appli/exampleVolumeRendering.bbg [new file with mode: 0644]
packages/wxvtk/bbs/appli/exampleVolumeRendering.bbs
packages/wxvtk/bbs/boxes/bbSimpleIsoSurfaceViewer.bbg [new file with mode: 0644]
packages/wxvtk/bbs/boxes/bbSimpleIsoSurfaceViewer.bbs
packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbg [new file with mode: 0644]
packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbs
packages/wxvtk/src/bbwxvtkViewer2D.cxx
packages/wxvtk/src/bbwxvtkViewer2D.h
packages/wxvtk/src/bbwxvtkViewer3D.cxx
packages/wxvtk/src/bbwxvtkViewer3D.h
packages/wxvtk/src/bbwxvtkwxVTKRenderWindowInteractorTovtkRenderWindowInteractor.cxx
packages/wxvtk/src/wxVTKRenderWindowInteractor.cxx [deleted file]
packages/wxvtk/src/wxVTKRenderWindowInteractor.h [deleted file]
packages/wxvtk/src/wxvtkImageViewer2.cxx
packages/wxvtk/src/wxvtkImageViewer2.h

index 53dd24fc1c8be4bc0d960b2916526fca853c3cad..0dfb6ae0374ee9abcdf77fb0336b9c8eaff8622c 100644 (file)
@@ -38,7 +38,14 @@ SET(SOURCES
 
 IF(BBTK_USE_WXWIDGETS AND WIN32)
   ADD_EXECUTABLE(bbStudio WIN32 ${SOURCES})  
-  SET_TARGET_PROPERTIES(bbStudio PROPERTIES LINK_FLAGS /subsystem:console )
+  
+  IF(MINGW)
+       SET_TARGET_PROPERTIES(bbStudio PROPERTIES LINK_FLAGS -mconsole )
+  ELSE(MINGW)
+       SET_TARGET_PROPERTIES(bbStudio PROPERTIES LINK_FLAGS /subsystem:console )
+  ENDIF(MINGW)
+  
+  
 ELSE(BBTK_USE_WXWIDGETS AND WIN32)
   ADD_EXECUTABLE(bbStudio MACOSX_BUNDLE ${SOURCES}  )  
 ENDIF(BBTK_USE_WXWIDGETS AND WIN32)
index 4a00d22c35e82c046b0b3052aed9855868c29f08..26163a83eab127c1d401996589a449e88ae935aa 100644 (file)
 #include <wx/cmdline.h> 
 #include <vector>
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       static const wxCmdLineEntryDesc cmdLineDesc[] =
+       {
+         { wxCMD_LINE_PARAM,  NULL, NULL, _T("file1 [file2 [...]]"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, 
+         { wxCMD_LINE_SWITCH, _T("h"), _T("help"),   _T("Prints this help") },
+         { wxCMD_LINE_SWITCH, _T("d"), _T("debug"),   _T("Message all 9") },
+         { wxCMD_LINE_NONE }
+       };
+#else
+       static const wxCmdLineEntryDesc cmdLineDesc[] =
+       {
+         { wxCMD_LINE_PARAM,  NULL, NULL, "file1 [file2 [...]]", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, 
+         { wxCMD_LINE_SWITCH, "h", "help",   "Prints this help" },
+         { wxCMD_LINE_SWITCH, "d", "debug",   "Message all 9" },
+         { wxCMD_LINE_NONE }
+       };
+#endif
 
-static const wxCmdLineEntryDesc cmdLineDesc[] =
-{
-  { wxCMD_LINE_PARAM,  NULL, NULL, _T("file1 [file2 [...]]"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, 
-  { wxCMD_LINE_SWITCH, _T("h"), _T("help"),   _T("Prints this help") },
-  { wxCMD_LINE_SWITCH, _T("d"), _T("debug"),   _T("Message all 9") },
-  { wxCMD_LINE_NONE }
-};
 
 
 
@@ -132,7 +143,11 @@ bool wxBBIApp::OnInit( )
 //  you need to use the linker option "/subsystem:console" and the following code:
 int main(int argc, char* argv[])
 {
-       return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
+               // EED 2018-07-16
+       char buffer[1500];
+       wcstombs(buffer , ::GetCommandLine() , 1500 );
+    return WinMain(::GetModuleHandle(NULL), NULL, buffer , SW_SHOWNORMAL);
+//    return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
 }
 
 #endif // defined(_WIN32) 
index 43f89023c53ed59c3d9f223eed78d26fe0347a03..412e66e665a570320d5e63c109dac34cc5eb7fab 100644 (file)
@@ -103,6 +103,7 @@ private:
   std::string mTemplateImplementation;
 
   std::vector<std::string> mInclude;
+  std::string mVerbosePreprocessor;
   std::vector<std::string> mTypedef;
 
   std::string mUserSetDefaultValues;
@@ -293,6 +294,14 @@ void bbfy::ParseXML()
       mAuthor += val;
     }
 
+  // Verbose preprocessor
+  for (i=0,j=0; i<BB.nChildNode("verbosePreprocessor"); i++) 
+  {
+    std::string val;
+    bbtk::GetTextOrClear(BB.getChildNode("verbosePreprocessor",&j),val);
+    mVerbosePreprocessor += val + "\n";
+  }
+
   // Description
   for (i=0,j=0; i<BB.nChildNode("description"); i++) 
     {
@@ -555,6 +564,9 @@ void bbfy::CreateHeader()
   mFile << "#ifndef " << included <<"\n";
   mFile << "#define " << included <<"\n";
 
+  // Verbose preprocessor
+  mFile << mVerbosePreprocessor << "\n";
+
   // Includes 
   mFile << "#include \"bb" << mPackage << "_EXPORT.h\"\n";
   std::vector<std::string>::iterator i;
index a8a2ddbce007f178a9b779c6eea37661544bf168..381e872d0f5180331cf7866fdde07ef246b4989a 100644 (file)
@@ -37,7 +37,12 @@ SET(SOURCES
 
 IF(BBTK_USE_WXWIDGETS AND WIN32)
   ADD_EXECUTABLE(bbi WIN32 ${SOURCES})  
-  SET_TARGET_PROPERTIES(bbi PROPERTIES LINK_FLAGS /subsystem:console )
+  IF(MINGW)
+       SET_TARGET_PROPERTIES(bbi PROPERTIES LINK_FLAGS -mconsole )
+  ELSE(MINGW)
+       SET_TARGET_PROPERTIES(bbi PROPERTIES LINK_FLAGS /subsystem:console )
+#      SET_TARGET_PROPERTIES(bbi PROPERTIES LINK_FLAGS  )
+  ENDIF(MINGW)
 ELSE(BBTK_USE_WXWIDGETS AND WIN32)
   ADD_EXECUTABLE(bbi MACOSX_BUNDLE ${SOURCES})  
 ENDIF(BBTK_USE_WXWIDGETS AND WIN32)
index 89a3daa305de477cb5ad38f819a1875e7758de05..7918d1967bd2ccd5ca61c65f0b19b97ac4a7c4d4 100644 (file)
@@ -27,6 +27,8 @@
 
 #ifdef _USE_WXWIDGETS_
 
+#include <exception>
+
 //==========================================================================
 // WITH WX
 //==========================================================================
 #include <map>
 
 //==========================================================================
-// Command line options definition
-static const wxCmdLineEntryDesc cmdLineDesc[] =
-{
-  { wxCMD_LINE_SWITCH, _T("h"), _T("help"),   _T("print this help or help on the application defined in input bbs file if any") },
-  { wxCMD_LINE_SWITCH, _T("g"), _T("graphical-dialog"),   _T("prompt the input parameter values using graphical dialog") },
-  { wxCMD_LINE_SWITCH, _T("t"), _T("text-dialog"),   _T("prompt the input parameter values in text mode") },
-  { wxCMD_LINE_SWITCH, _T("c"), _T("console"), _T("open bbi console") },
-  { wxCMD_LINE_SWITCH, _T("N"), _T("no-console"),   _T("never open bbi console even on error") },
-  { wxCMD_LINE_SWITCH, _T("q"), _T("quiet"),   _T("be quiet (='message max 0')") },
-  { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("turn all messages on (='message all 9')") },
-  { wxCMD_LINE_SWITCH, _T("D"), _T("Debug"), _T("memory debug on exit (='debug -D')") },
-  { wxCMD_LINE_PARAM,  NULL, NULL, _T("file [file [...]]"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },
-  { wxCMD_LINE_NONE }
-};
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       // Command line options definition
+       static const wxCmdLineEntryDesc cmdLineDesc[] =
+       {
+         { wxCMD_LINE_SWITCH, _T("h"), _T("help"),   _T("print this help or help on the application defined in input bbs file if any") },
+         { wxCMD_LINE_SWITCH, _T("g"), _T("graphical-dialog"),   _T("prompt the input parameter values using graphical dialog") },
+         { wxCMD_LINE_SWITCH, _T("t"), _T("text-dialog"),   _T("prompt the input parameter values in text mode") },
+         { wxCMD_LINE_SWITCH, _T("c"), _T("console"), _T("open bbi console") },
+         { wxCMD_LINE_SWITCH, _T("N"), _T("no-console"),   _T("never open bbi console even on error") },
+         { wxCMD_LINE_SWITCH, _T("q"), _T("quiet"),   _T("be quiet (='message max 0')") },
+         { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("turn all messages on (='message all 9')") },
+         { wxCMD_LINE_SWITCH, _T("D"), _T("Debug"), _T("memory debug on exit (='debug -D')") },
+         { wxCMD_LINE_PARAM,  NULL, NULL, _T("file [file [...]]"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },
+         { wxCMD_LINE_NONE }
+       };
+#else
+       // Command line options definition
+       static const wxCmdLineEntryDesc cmdLineDesc[] =
+       {
+         { wxCMD_LINE_SWITCH, "h", "help",   "print this help or help on the application defined in input bbs file if any" },
+         { wxCMD_LINE_SWITCH, "g", "graphical-dialog",   "prompt the input parameter values using graphical dialog" },
+         { wxCMD_LINE_SWITCH, "t", "text-dialog",   "prompt the input parameter values in text mode" },
+         { wxCMD_LINE_SWITCH, "c", "console", "open bbi console" },
+         { wxCMD_LINE_SWITCH, "N", "no-console",   "never open bbi console even on error" },
+         { wxCMD_LINE_SWITCH, "q", "quiet",   "be quiet (='message max 0')" },
+         { wxCMD_LINE_SWITCH, "d", "debug", "turn all messages on (='message all 9')" },
+         { wxCMD_LINE_SWITCH, "D", "Debug", "memory debug on exit (='debug -D')" },
+         { wxCMD_LINE_PARAM,  NULL, NULL, "file [file [...]]", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },
+         { wxCMD_LINE_NONE }
+       };
+#endif
+
+
+
+
 //==========================================================================
 
 //==========================================================================
@@ -88,13 +113,20 @@ void WxProcessCmdLine::Process(wxCmdLineParser& parser)
       bbtk::StaticInitTime::PrintObjectListInfo = true;
     }
   
-  debug = ( parser.Found(_T("d")) );  
-  quiet = ( parser.Found(_T("q")) );
-  help = ( parser.Found(_T("h")) );
-  graphical_dialog = ( parser.Found(_T("wxcommandlineg")) );
-  text_dialog = ( parser.Found(_T("t")) );
-  no_console = ( parser.Found(_T("N")) );
-  
+  debug                        = ( parser.Found(_T("d")) );  
+  quiet                        = ( parser.Found(_T("q")) );
+  help                         = ( parser.Found(_T("h")) );
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+  graphical_dialog     = ( parser.Found(_T("wxcommandlineg")) );
+#else
+  printf("EED Warnning. WxProcessCmdLine::Process  g  wxcommandlineg \n");
+  graphical_dialog     = ( parser.Found(_T("g")) );
+#endif
+
+  text_dialog          = ( parser.Found(_T("t")) );
+  no_console           = ( parser.Found(_T("N")) );
   if (quiet) bbtk::MessageManager::SetMessageLevel("max",0);
   if (debug) bbtk::MessageManager::SetMessageLevel("all",9);
 
@@ -130,7 +162,7 @@ void WxProcessCmdLine::Process(wxCmdLineParser& parser)
              ((input_file.size() == 0) && 
               (!no_console) &&
               (!usage) ) );
-  
+
 }
 //==========================================================================
 
@@ -188,7 +220,6 @@ bool wxBBIApp::OnInit( )
   setlocale(LC_NUMERIC, "C");
 #endif
   
-
   if (cmd.quiet) bbtk::MessageManager::SetMessageLevel("max",0);
   if (cmd.debug) bbtk::MessageManager::SetMessageLevel("all",9);
   
@@ -197,7 +228,6 @@ bool wxBBIApp::OnInit( )
 //printf ("EED bbi wxBBIApp::OnInit .....................\n");
 //cmd.input_file.push_back("/home/davila/Borrame/testwt.bbs");
 
-
   bbtk::WxGUIConsole *I = new bbtk::WxGUIConsole(0,_T("bbi"),wxSize(800,600));
   SetTopWindow(I);  
   if (cmd.console) I->Show(true);
@@ -213,6 +243,7 @@ bool wxBBIApp::OnInit( )
   std::vector<std::string>::const_iterator i;
   bool error = false;
 
+
   for (i=cmd.input_file.begin(); i!=cmd.input_file.end(); ++i) 
     {
       error = ! I->InterpretFile(*i);
@@ -229,6 +260,7 @@ bool wxBBIApp::OnInit( )
       I->GetInterpreter()->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace",package,false);
     }
 
+
   /*
   std::cout << "soe="<<show_on_error <<std::endl;
   std::cout << "con="<<console<<std::endl;
@@ -265,13 +297,17 @@ IMPLEMENT_APP(wxBBIApp);
 //  you need to use the linker option "/subsystem:console" and the following code:
 int main(int argc, char* argv[])
 {
-
 //Borrame
 //FILE *ff; ff = fopen ("/tmp/wt.log","a+"); fprintf(ff,"EED main C\n"); fclose(ff);
 
-    return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
+       // EED 2018-07-16
+       char buffer[1500];
+       wcstombs(buffer , ::GetCommandLine() , 1500 );
+    return WinMain(::GetModuleHandle(NULL), NULL, buffer , SW_SHOWNORMAL);
+       //    return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
 }
 
+
 #else 
 //==========================================================================
 // OTHER ( Linux... )
@@ -282,7 +318,6 @@ IMPLEMENT_APP_NO_MAIN(wxBBIApp);
 
 int main(int argc, char* argv[])
 {      
-
 //Borrame
 //FILE *ff; ff = fopen ("/tmp/wt.log","a+"); fprintf(ff,"EED main A\n"); fclose(ff);
 
@@ -300,7 +335,7 @@ int main(int argc, char* argv[])
 
   if (!cmdline.proceed) return 0;
 
-  if (cmdline.no_console) 
+       if (cmdline.no_console) 
     {
       //      std::cout << "main NC"<<std::endl;
       // Interpreter 
@@ -313,27 +348,26 @@ int main(int argc, char* argv[])
       bool error = false;
       for (i=cmdline.input_file.begin(); 
           i!=cmdline.input_file.end(); ++i) 
-       {
-         error = ! I->InterpretFile(*i);
-         if (error) break;
-       }
-      if (help_on_script) 
-       {
-         I->SetNoExecMode(false);
-         std::string package; 
-         I->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace",
+               {
+                       error = ! I->InterpretFile(*i);
+                       if (error) break;
+               }
+       if (help_on_script) 
+               {
+                       I->SetNoExecMode(false);
+                       std::string package; 
+                       I->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace",
                                                              package,
                                                              false);
-       }
-      if (cmdline.input_file.size()==0)
-       I->CommandLineInterpreter();
-
+               }
+       if (cmdline.input_file.size()==0)
+               {
+                       I->CommandLineInterpreter();
+               } // if cmdline.input_file.size
       //
-    }
-  else 
-    {
+    } else {
       wxEntry(argc, argv);
-    }
+    } // if cmdline.no_console
 
 }
 
index 634a2a7bbbe86874a981a0628365395583a8f54d..33553cb63d9d8a70189ecc7b3ce0a66d7c68926a 100644 (file)
@@ -49,7 +49,6 @@ IF(WIN32)
   SET(BBTK_BBFY "${BBTK_BIN_PATH}/bbfy")
   SET(BBTK_BBPCONFIGURATOR "${BBTK_BIN_PATH}/bbpConfigurator")
   SET(BBTK_BBDOC "${BBTK_BIN_PATH}/bbdoc")
-  
 ELSE(WIN32)
 #  SET (EXECUTABLE_OUTPUT_REL_PATH bin) 
 #  SET (LIBRARY_OUTPUT_REL_PATH    bin)
index 6dad172133df7400a83e879a10688d65501419f4..0e2706d8ee5b40e2b98dc5556ee22f9eb2d4c5f6 100644 (file)
@@ -25,7 +25,7 @@
 
 
 
-FILE(GLOB_RECURSE ALL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.*")
+FILE(GLOB_RECURSE ALL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*")
 
 # TO DO : REMOVE CMakeLists.txt FROM LIST !!!
 
index eab078afa44f902f6be720483e20e881acedd5cc..b1513644ce7fadb5245b3329b8d247cf375c8375 100644 (file)
@@ -120,7 +120,7 @@ FOREACH(xmlfile ${${BBTK_PACKAGE_NAME}_XML_SOURCES})
        COMMAND echo ${BBFY_CXX_OUT}
        COMMAND  echo set "Path=${crea_DIR}/bin/\;"${DLL_PATH} 
        COMMAND  echo ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
-       COMMAND echo ${BBFY_CXX_OUT}
+##     COMMAND echo ${BBFY_CXX_OUT}
        COMMAND  set "Path=${crea_DIR}/bin/\;"${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
  ##  COMMAND  set Path=${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
     DEPENDS ${xmlfile}
index a57a7079a3ad621cb816cf52e1c92094fcdbad09..4ae316bba7737d3d9ea9ac601f76c576644b1907 100644 (file)
@@ -96,7 +96,7 @@ MESSAGE(STATUS "")
 IF(BBTK_USE_WXWIDGETS)
   SET(BBTK_LINK_LIBRARIES
     ${BBTK_LINK_LIBRARIES}
-    ${WXWIDGETS_LIBRARIES} 
+    ${WXWIDGETS_LIBRARIES}
     )
 ENDIF(BBTK_USE_WXWIDGETS)
 #-----------------------------------------------------------------------------
@@ -138,6 +138,14 @@ IF(UNIX)
 ENDIF(UNIX)
 #-----------------------------------------------------------------------------
 
+# mingw 
+IF(MINGW)
+  SET(BBTK_LINK_LIBRARIES
+    ${BBTK_LINK_LIBRARIES}
+    dl) 
+ENDIF(MINGW)
+
+
 #-----------------------------------------------------------------------------
 MESSAGE(STATUS "")
 MESSAGE(STATUS "=======================================")
index dc2584328a7bc59e24fe8448216ccbf5fb648fd6..f6305aacc5fc2f0220685b65a2315edfebcdf62d 100644 (file)
@@ -82,6 +82,10 @@ IF(WIN32)
          ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
            SET(BBTK_BIN_PATH $(SolutionDir)/$(OutDir))
          ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+         IF(MINGW)
+               message ( ${EXECUTABLE_OUTPUT_PATH} )
+           SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH} )
+         ENDIF(MINGW)
   ENDIF(MSVC10)
   SET(BBTK_BBS2CPP ${BBTK_BIN_PATH}/bbs2cpp.exe)
   SET(BBTK_BBC ${BBTK_BIN_PATH}/bbc.exe)
index 44e3b2c8e411f44021be62f35f67272b1014c838..70e2ba847bb111aa56084fff2e24881000285d2e 100644 (file)
@@ -1,4 +1,4 @@
- # ---------------------------------------------------------------------
+ # ---------------------------------------------------------------------
  #
  # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
  #                        pour la SantÈ)
@@ -92,10 +92,12 @@ IF(UNIX) #Avoid polluting Win32 cmakecache
   CHECK_INCLUDE_FILE("inttypes.h"   CMAKE_HAVE_INTTYPES_H)
   # termios 
   CHECK_INCLUDE_FILE("termios.h"   CMAKE_HAVE_TERMIOS_H)
+
 ENDIF(UNIX)
+
 # Special Time support, two conventions: *NIX vs Win32
-CHECK_INCLUDE_FILE("sys/times.h"    CMAKE_HAVE_SYS_TIMES_H)
-CHECK_INCLUDE_FILE("sys/timeb.h"    CMAKE_HAVE_SYS_TIMEB_H)
+ CHECK_INCLUDE_FILE("sys/times.h"    CMAKE_HAVE_SYS_TIMES_H)
+ CHECK_INCLUDE_FILE("sys/timeb.h"    CMAKE_HAVE_SYS_TIMEB_H)
 #-----------------------------------------------------------------------------
 
   
index 0c304e081d882cf2224bb207e22fc3058c82cb1a..2c9b0c57d7ec97f7521152d85861fa9d08d0aaf8 100644 (file)
@@ -103,7 +103,7 @@ namespace bbtk
   ///  Gets the input Data of a given name
   Data AtomicBlackBox::bbGetInput( const std::string &name ) 
   {
-    bbtkBlackBoxDebugMessage("data",7,
+  bbtkBlackBoxDebugMessage("data",7,
                             "AtomicBlackBox::bbGetInput(\""<<name<<"\")"
                             <<std::endl);  
     
@@ -200,6 +200,5 @@ namespace bbtk
   }
   //==========================================================================
 
 }
 // EO namespace bbtk
index f9d09f6ce064e3c123cc23b268c5148cdf19596f..9d38547c96627753cb9e04afe4da894be44035e7 100644 (file)
@@ -49,7 +49,6 @@
 
 #include "bbtkBlackBox.h"
 #include "bbtkAtomicBlackBoxDescriptor.h"
-
 namespace bbtk
 {
 
index 731ceed4518f5dc01b720e1cbc84d37a13de0628..a57dc65536774b764d214221164e7a2b90744f1b 100644 (file)
   
 //============================================================================
 
+
+
 //============================================================================
 /// Declares the standard interface of a AtomicBlackBox 
 /// (ctor, New, descriptor related methods)
+
+//EED 2017-08-29  itk3to4
+/*
+  std::string GetObjectName()  const                           \
+*/
+
 #define BBTK_BLACK_BOX_INTERFACE_INTERNAL(CLASS,PARENT)                \
   BBTK_OBJECT_MINIMAL_INTERFACE;                               \
   private:                                                             \
@@ -91,7 +99,7 @@
        bool allocate_connectors = true);                               \
   ~CLASS();                                                            \
   public:                                                              \
-  std::string GetObjectName() const                                    \
+  std::string GetObjectName()                                  \
   { return std::string(#CLASS)+std::string(" '")                       \
       +bbGetNameWithParent()+std::string("'"); }                       \
   inline static Pointer New(const std::string& name)                   \
index db02118273aaa83c2f12a3e7f912c656dca50d1e..6da0d20270400ef2470e83d3d6a605e4927c4a4e 100644 (file)
@@ -56,8 +56,8 @@
 #include <set>
 
 // Signal/slot mechanism for output change events
-#include <boost/signals2/signal.hpp>
 #include <boost/bind.hpp>
+#include <boost/signals2/signal.hpp>
 
 
 #define bbtkBlackBoxMessage(key,level,mess) \
@@ -67,7 +67,6 @@
 
 namespace bbtk
 {
-
   struct Void { Void(int = 0) {} };
 
   class Factory;
index 770608440abde5f91c223b2e011f26b41724cce0..e5b852945184c23a50ca9cd2aaa0b1e76b6af827 100644 (file)
@@ -146,7 +146,6 @@ namespace bbtk
       Utilities::replace( mBbs_paths[iStrVec] , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
     }
 
-
     // always add "." (current working directory) at the begining
     mPackage_paths.push_back(".");
     // add system bin path (for build tree / standalone folder install)
@@ -214,6 +213,7 @@ namespace bbtk
 
     // In any case, deal with bbtk_config.xml!
     Read(configXmlFullPathName.c_str());
+       
   }
   //=========================================================================
 
@@ -342,105 +342,114 @@ namespace bbtk
 
 
     // -----------------------------------------------------------------
-#if defined(__GNUC__)
+#if defined(WIN32)
 
-    // ------------------ create some usefull strings ----------------
     // installed bbtk_path
-    char bbtk_path[1000];
-    strcpy(bbtk_path, Utilities::GetExecutablePath().c_str());  // JPR
-    //strcpy(bbtk_path, "/usr/local/bin");
-
-
-    std::string str_home=Utilities::GetEnvHome();
-
+    char bbtk_path[100];
+    strcpy(bbtk_path, "\"c:\\Program Files\\BBTK\\bin\"");
+    char bbtk_path2[100];
+    strcpy(bbtk_path2, "c:\\Program Files\\BBTK\\bin");
 
     // rootDirectory
     char rootDirectory[200];
-    sprintf( rootDirectory,  "%s/.bbtk", str_home.c_str());
+    sprintf(rootDirectory, "%s\\.bbtk",getenv("USERPROFILE"));
+    //  std::cout << "[" << rootDirectory << "]" << std::endl;
 
     // configPath
     char configPath[200];
-    sprintf(configPath, "%s/bbtk_config.xml",rootDirectory);
+    sprintf(configPath, "%s\\bbtk_config.xml",rootDirectory);
+
+    // makeDir
+    char makeDir[250];
+    sprintf( makeDir, "mkdir \"%s\" ", rootDirectory);
 
     // configXmlTmp
     char configXmlTmp[250];
-    sprintf(configXmlTmp, "%s/bbtk_config.xml.tmp", bbtk_path);
+    sprintf(configXmlTmp, "%s\\bbtk_config.xml.tmp", bbtk_path2);
 
     // copyFile
     char copyFile[250];
 
-    if (!Utilities::FileExists(configXmlTmp)) // bbtk_config.xml.tmp not found (not installed)
+    if (!Utilities::FileExists(configXmlTmp)) // bbtk_config.xml.tmp not found
       {
        // if "bbtk_path/bbtk_config.xml.tmp" doesn't exist, hard-create a minimum version in .bbtk
        CreateConfigXML( rootDirectory );// create .bbtk
+       return;
       }
-    else
-      {
-       sprintf(copyFile,"cp %s  %s/bbtk_config.xml ",configXmlTmp,rootDirectory );
-       if (!Utilities::FileExists(configPath))
-         {
-           system(copyFile);
-         }
-      }
-    return;
 
+    sprintf(copyFile,"copy %s\\bbtk_config.xml.tmp \"%s\"\\bbtk_config.xml ",bbtk_path,rootDirectory );
+
+       WCHAR    rootDirectory2[200];
+       MultiByteToWideChar( 0,0, rootDirectory, 200, rootDirectory2, 6);
+       LPCWSTR rootDirectory3 = rootDirectory2;
+       int attribs = GetFileAttributes (rootDirectory3);
+//    int attribs = GetFileAttributes (rootDirectory3);
+       
+       
+    bbtkMessage("config",1,std::hex << attribs << " " << FILE_ATTRIBUTE_DIRECTORY << std::endl);
+    if ( attribs != 0xFFFFFFFF)
+    {
+               if ((attribs & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY ) /// \TODO : check !
+               {       
+                       WCHAR    configPath2[200];
+                       MultiByteToWideChar( 0,0, configPath, 200, configPath2, 6);
+                       LPCWSTR configPath3 = configPath2;
+                       if ( GetFileAttributes( configPath3 ) == 0xFFFFFFFF)
+                       //if ( GetFileAttributes( configPath ) == 0xFFFFFFFF)
+                       {
+                               system(copyFile);
+                       }
+               }
+    } else {
+               system(makeDir);
+               system(copyFile);
+       }
+  return;
     // ------------------------------------------------------------------
-#elif defined(WIN32)
+#elif defined(__GNUC__)
+    // ------------------ create some usefull strings ----------------
+    // installed bbtk_path
+    char bbtk_path[1000];
+    strcpy(bbtk_path, Utilities::GetExecutablePath().c_str());  // JPR
+    //strcpy(bbtk_path, "/usr/local/bin");
 
 
-    // installed bbtk_path
-    char bbtk_path[100];
-    strcpy(bbtk_path, "\"c:\\Program Files\\BBTK\\bin\"");
-    char bbtk_path2[100];
-    strcpy(bbtk_path2, "c:\\Program Files\\BBTK\\bin");
+    std::string str_home=Utilities::GetEnvHome();
+
+       #if defined(WIN32)      
+               str_home="C:"+str_home;
+       #endif
 
     // rootDirectory
     char rootDirectory[200];
-    sprintf(rootDirectory, "%s\\.bbtk",getenv("USERPROFILE"));
-    //  std::cout << "[" << rootDirectory << "]" << std::endl;
+    sprintf( rootDirectory,  "%s/.bbtk", str_home.c_str());
 
     // configPath
     char configPath[200];
-    sprintf(configPath, "%s\\bbtk_config.xml",rootDirectory);
-
-    // makeDir
-    char makeDir[250];
-    sprintf( makeDir, "mkdir \"%s\" ", rootDirectory);
+    sprintf(configPath, "%s/bbtk_config.xml",rootDirectory);
 
     // configXmlTmp
     char configXmlTmp[250];
-    sprintf(configXmlTmp, "%s\\bbtk_config.xml.tmp", bbtk_path2);
+    sprintf(configXmlTmp, "%s/bbtk_config.xml.tmp", bbtk_path);
 
     // copyFile
     char copyFile[250];
 
-    if (!Utilities::FileExists(configXmlTmp)) // bbtk_config.xml.tmp not found
+    if (!Utilities::FileExists(configXmlTmp)) // bbtk_config.xml.tmp not found (not installed)
       {
        // if "bbtk_path/bbtk_config.xml.tmp" doesn't exist, hard-create a minimum version in .bbtk
        CreateConfigXML( rootDirectory );// create .bbtk
-       return;
       }
-
-    sprintf(copyFile,"copy %s\\bbtk_config.xml.tmp \"%s\"\\bbtk_config.xml ",bbtk_path,rootDirectory );
-
-    int attribs = GetFileAttributes (rootDirectory);
-    bbtkMessage("config",1,std::hex << attribs << " " << FILE_ATTRIBUTE_DIRECTORY << std::endl);
-    if ( attribs != 0xFFFFFFFF)
+    else
       {
-       if ((attribs & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY ) /// \TODO : check !
+       sprintf(copyFile,"cp %s  %s/bbtk_config.xml ",configXmlTmp,rootDirectory );
+       if (!Utilities::FileExists(configPath))
          {
-           if ( GetFileAttributes( configPath ) == 0xFFFFFFFF)
-             {
-               system(copyFile);
-             }
+           system(copyFile);
          }
       }
-    else
-      {
-       system(makeDir);
-       system(copyFile);
-      }
     return;
+
     // ------------------------------------------------------------------
 #else
 /// \todo  ConfigurationFile::InstallPath() : exit when for not WIN32 and not__GNUC__
index 335c67128aaebcce9cae1e2b388992c051d897e0..9118e9b8226b5d784b69bde6fc646a7e676c15cc 100644 (file)
 // the RTTI mechanism travel correctly across packages (typeid,dynamic_cast...)
 // however this can cause problems (symbol clashes) ...
 // see :
+// https://linux.die.net/man/3/dlopen
 // http://gcc.gnu.org/faq.html#dso
 // http://gcc.gnu.org/ml/gcc/2003-04/msg00256.html
 // http://gcc.gnu.org/ml/gcc-bugs/2003-10/msg02771.html
+
+#define BBTK_RTLD_LOCAL
+
 #ifndef BBTK_RTLD_LOCAL
 #  define BBTK_RTLD_SCOPE RTLD_GLOBAL
 #else 
index d99fec59e634805b501dc762c733bf295da5add2..18ca1a6e24dc3bd61510df53528f54b1d4c3cc33 100644 (file)
@@ -71,7 +71,8 @@ namespace bbtk
       : mObject(object),
        mSourceFile(source_file),
        mMessage(message)
-    {}
+    {
+       }
     ~Exception() throw() {}
     void Print() throw()
     {
index bf51fe564d3a1b644ee850f9bbc044d9b3abfa08..a55fce1c41ede5eb012bd5ff065387725465b55c 100644 (file)
@@ -82,7 +82,9 @@ namespace bbtk
     // We have to "lock" the smart pointer because the factory
     // only keeps a weak pointer on the executer
     // -> this would auto-destroy !!
+       
     mFactory->SetExecuter(MakePointer(this,true));
+
     Reset();
     bbtkDebugMessage("object",2,"<== Executer()" <<std::endl);
   }
index d541db35b9203e89b984a63daa7c2dd1a7760eb5..d240eedbafacb8461a79c6a635b090cd7e7a9ad0 100644 (file)
@@ -106,7 +106,6 @@ namespace bbtk
                               std::string pkgname,
                               std::string path)
   {
-    
     Package::Pointer p = Package::CreateFromDynamicLibrary(libname,
                                                           pkgname,
                                                           path);
@@ -125,8 +124,7 @@ namespace bbtk
        mPackageMap[pkgname] = p;
        return true;
       }
-    return false;
-    
+    return false;    
   }
   
   //===================================================================
@@ -148,7 +146,6 @@ namespace bbtk
   void Factory::LoadPackage( const std::string& name )
   {
          
-         
   // Note : in the following :
   // name : the user supplied name
   //      - abreviated name    e.g.       pkg   pkg.so   libbpkg   libbbpkg.so
@@ -228,21 +225,15 @@ namespace bbtk
                          // The following is *NOT* a debug time message :
                          // It's a user intended message.
                          // Please don't remove it.
-                       bbtkMessage("output",3,"   [" <<libname 
-                               <<"] : doesn't exist" <<std::endl);
-                         }
-                         else
-                         {
+                               bbtkMessage("output",3,"   [" << libname <<"] : doesn't exist" <<std::endl);
+                       } else {
                                 ok = DoLoadPackage( libname, pkgname, path);         
-                         }
-                  }
-                  else
-                  {
+                       }
+                  } else {
                          bbtkError("Path ["<<upath<<"] doesn't exist");
                          return;
                   }
-               }
-               else     // ----------------------------------------------------- iterate on the paths  
+               } else     // ----------------------------------------------------- iterate on the paths  
                {
 
                std::string path = ".";
@@ -280,7 +271,6 @@ namespace bbtk
                        foundFile = true; 
 
                  // Try to Load the library
-
                        ok = DoLoadPackage( libname, pkgname, path);
                        if (ok)
                        {
@@ -317,9 +307,6 @@ namespace bbtk
                }       
                bbtkMessage("output",2,"[" << libname << "] loaded" << std::endl);
        }
-
-    
-
   }
 
   //===================================================================
index a31fe0f20ceb0b589eae32be38e01864d09a1e5f..a1a0fd10793034b4745c4196f39cf6050833be00 100644 (file)
@@ -97,23 +97,16 @@ namespace bbtk
   //=======================================================================
   void Interpreter::Init(VirtualExec::Pointer e, const std::string& cpp_file) 
   {
-    if (e)
-      {
-       mVirtualExecuter = e;
-      }
-    else if (cpp_file.size()!=0)
-      {
-       mVirtualExecuter = boost::static_pointer_cast<VirtualExec>(bbtk::Transcriptor::New(cpp_file));
-      }
-    else 
-      {
-       bbtk::Executer::Pointer exe = bbtk::Executer::New();
-       mRealExecuter = exe;
-       mVirtualExecuter = boost::static_pointer_cast<VirtualExec>(exe);
+    if (e) {
+               mVirtualExecuter = e;
+    } else if (cpp_file.size()!=0){
+               mVirtualExecuter = boost::static_pointer_cast<VirtualExec>(bbtk::Transcriptor::New(cpp_file));
+    } else  {
+               bbtk::Executer::Pointer exe = bbtk::Executer::New();
+               mRealExecuter = exe;
+               mVirtualExecuter = boost::static_pointer_cast<VirtualExec>(exe);
       }
 
-         
-         
     // Lock this pointer or will auto-destruct !!
     if (!e) mVirtualExecuter->SetInterpreter(MakePointer(this,true));
 
index 93d05ed5cf88ef1d335734a949476b26cb088134..451ade9e45cabbbfea1285770f41f77aa45bec28 100644 (file)
@@ -516,6 +516,7 @@ namespace bbtk
   //=======================================================================
   void InterpreterVirtual::CatchUnknownException()
   {
+printf("EED InterpreterVirtual::CatchUnknownException Start\n");
 //EED Borrame   if (GetExecuter()->GetNoErrorMode()) 
 //EED Borrame       {
 //EED Borrame  std::string file("?");
@@ -556,27 +557,28 @@ namespace bbtk
        CloseAllFiles();
        std::cerr << mess.str();
       }
+printf("EED InterpreterVirtual::CatchUnknownException End\n");
   }
   //=======================================================================
 
   //=======================================================================
   
-#define CATCH_MACRO                                    \
-  catch (InterpreterException e)                       \
-    {                                                  \
-      CatchInterpreterException(e);                    \
-    }                                                  \
+#define CATCH_MACRO                                            \
+  catch (InterpreterException e)               \
+    {                                                                  \
+      CatchInterpreterException(e);            \
+    }                                                                  \
   catch (bbtk::Exception e)                            \
-    {                                                  \
-      CatchBbtkException(e);                           \
-    }                                                  \
+    {                                                                  \
+      CatchBbtkException(e);                   \
+    }                                                                  \
   catch (std::exception& e)                            \
-    {                                                  \
+    {                                                                  \
       CatchStdException(e);                            \
-    }                                                  \
-  catch (...)                                          \
-    {                                                  \
-      CatchUnknownException();                         \
+    }                                                                  \
+  catch (...)                                                  \
+    {                                                                  \
+      CatchUnknownException();                 \
     }                                          
   //=======================================================================
    
@@ -611,8 +613,7 @@ namespace bbtk
 
 
   //=======================================================================
-  InterpreterVirtual::ExitStatus 
-  InterpreterVirtual::InterpretBuffer( std::stringstream* buffer )
+  InterpreterVirtual::ExitStatus   InterpreterVirtual::InterpretBuffer( std::stringstream* buffer )
   {
     bbtkDebugMessage("interpreter",4,"==> InterpreterVirtual::InterpretBuffer()"<<std::endl);
 
@@ -633,6 +634,7 @@ namespace bbtk
 
     
     mCommandLine = exm;
+
     return mStatus;
   }
   //=======================================================================
index 51d7da68c13c1fc0ae5198bcd2c6407b1e136586..c5a82117fb468bbe6372ef41dd047bbd30befc36 100644 (file)
                        s.str());                       \
       throw e;                                         \
     }                                                  \
-  while (0) 
+  while (0); 
 
 #define BBTK_INTERNAL_ERROR_MESSAGE \
   "\n\n***********************************************\n**** THIS IS AN INTERNAL ERROR TO BBTK     ****\n**** Please send a full bug report to :    ****\n****  bbtk-developers@creatis.insa-lyon.fr ****\n***********************************************\n\n"
index c2d9e9a2bb4e8b2ffde01643ac2b2be6ce52ffba..a172adb8362746a52c5a0706b8d77e10db0d98df 100644 (file)
@@ -105,6 +105,7 @@ namespace bbtk
     {                                                                  
       if (s->mThisPointer.lock())                                      
        {                                                               
+//EED 2018-07-11 minwg64 
          boost::shared_ptr<U> p = s->template GetThisPointer<U>();
          if (!lock) s->mThisPointerLocked.reset();
          return p;
@@ -124,7 +125,8 @@ namespace bbtk
                                             bool lock = false)
     {                                                                  
       if (s->mThisPointer.lock())                                      
-       {                                                               
+       {                       
+//EED 2018-07-11 minwg64 
          boost::shared_ptr<U> p = s->template GetThisPointer<U>();
          if (!lock) s->mThisPointerLocked.reset();
          return p;
index 91cdb518372b220f124b1de33af8dc5c22c8912a..7507a2ab51d0f5ca1ca65967f2f31f435345e8a8 100644 (file)
@@ -85,10 +85,10 @@ namespace bbtk
     mDescription(description),
     mVersion(version)
   {
-
     bbtkDebugMessage("object",2,"==> Package('"<<name<<"',...)"
                     <<bbtkendl);
 
+                        
     std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
     char c = default_doc_dir.c_str()[strlen(default_doc_dir.c_str())-1];
     std::string url = default_doc_dir; 
@@ -111,7 +111,6 @@ namespace bbtk
     //    std::cout  << "relurl=["<<relurl<<"]"<<std::endl;
     bbtkDebugMessage("object",2,"<== Package::Package('"<<name<<"',...) OK"
                     <<bbtkendl);
-
   }
   //==========================================================================
 
@@ -361,6 +360,9 @@ namespace bbtk
   DynamicLibraryHandler Package::OpenDynamicLibrary( const std::string& libname,const std::string& package_name,
                                                                                                         DLGetPackageFunction& getpack, DLDeletePackageFunction& delpack)
   {
+
+printf("EED Package::OpenDynamicLibrary  %s   %s \n", libname.c_str(), package_name.c_str() );
+
     bbtkDebugMessage("package",3,"==> Package::OpenDynamicLibrary("
                     <<libname<<")"<<std::endl);
 #if defined(__GNUC__)
@@ -368,7 +370,7 @@ namespace bbtk
     // Open shared lib
     void *handler;
     handler = dlopen(libname.c_str(), BBTK_RTLD_TIME | BBTK_RTLD_SCOPE );
-//EED     handler = dlopen(libname.c_str(), RTLD_LAZY | RTLD_LOCAL );
+//     handler = dlopen(libname.c_str(), RTLD_LAZY | RTLD_LOCAL );
          
     if (!handler)
       {
index 558af50760310662e9a01bf08cfe0151c2ac301b..ecd60997d2d0c817b0898c589a96e5af9110b58e 100644 (file)
 
 
 #if defined(_WIN32) 
-  // IF NOT DEF THEN INTERNAL COMPILER ERROR WITH BOOST 1.37 ON VISUAL C++ 
-  #define BOOST_SP_NO_SP_CONVERTIBLE
+       #ifdef _MSC_VER
+         // IF NOT DEF THEN INTERNAL COMPILER ERROR WITH BOOST 1.37 ON VISUAL C++ 
+         #define BOOST_SP_NO_SP_CONVERTIBLE
+       #endif
 #endif
 
 #if defined(_WIN32) 
index 7e85dc76787497b9e350fc332188b4283f88304b..def9fd96352228527a9b6a821e00157395cbbdb6 100644 (file)
 
 
 
+#include "creaSystem.h"
 #include "bbtkUtilities.h"
 #include "bbtkMessageManager.h"
 
+//EED 2018-07-16
+#if defined(_WIN32) 
+       #include <shlwapi.h>
+#endif
+
 #if defined(MACOSX) // assume this is OSX 
 # include <sys/param.h>
 # include <mach-o/dyld.h> // _NSGetExecutablePath : must add -framework CoreFoundation to link line 
@@ -282,8 +288,10 @@ namespace bbtk
        libname += pkgname;
 #if defined(MACOSX)
          libname += ".dylib";
-#else
-         libname += ".so";
+#elif defined(WIN32)                 // mingw      
+         libname += ".dll";
+#else                                // Linux
+         libname += ".so";
 #endif 
          
 #elif defined(_WIN32)
@@ -611,11 +619,39 @@ namespace bbtk
   }
   //=========================================================================  
   
+  
+  
+  
+//=====================================================================================
+/*  http://forums.codeguru.com/showthread.php?336106-WCHAR*-to-CHAR*
+|| ::DESCRIPTION::
+|| This function will convert a WCHAR string to a CHAR string.
+||
+|| Param 1 :: Pointer to a buffer that will contain the converted string. Ensure this
+||            buffer is large enough; if not, buffer overrun errors will occur.
+|| Param 2 :: Constant pointer to a source WCHAR string to be converted to CHAR
+*/
+/*
+void wtoc(const WCHAR* Source,CHAR* Dest)
+{
+    int i = 0;
+    while(Source[i] != '\0')
+    {
+        Dest[i] = (CHAR)Source[i];
+        ++i;
+    } // while
+}
+*/
+  
+  
+  
+  
   //=========================================================================  
   // From http://www.fltk.org/newsgroups.php?gfltk.general+v:22083
   //
   int get_app_path (char *pname, size_t pathsize)
   {
+
 #ifdef LINUX
     /* Oddly, the readlink(2) man page says no NULL is appended. */
     /* So you have to do it yourself, based on the return value: */
@@ -633,7 +669,12 @@ namespace bbtk
 #endif /* LINUX */
     
 #ifdef WIN32
-    long result = GetModuleFileName(NULL, pname, pathsize);
+
+//2018-07-06 mingw64
+    wchar_t pname2[512];
+    long result = GetModuleFileName(NULL, pname2, pathsize);
+       crea::System::wtoc(pname2,pname);
+//    long result = GetModuleFileName(NULL, pname, pathsize);
     if (result > 0)
       {
        /* fix up the dir slashes... */
@@ -731,6 +772,7 @@ namespace bbtk
     free (given_path);
     return status;
 #endif /* MACOSX */
+
     
     return -1; /* Path Lookup Failed */
   } 
@@ -743,18 +785,27 @@ namespace bbtk
   {
     char name[PATH_MAX];
     int err = get_app_path(name, PATH_MAX);
+printf("EED bbtk Utilities::GetExecutablePath 1%s \n",name);
+       
     if (err) 
-      {
-       bbtkGlobalError("Could not determine current executable path ?");  
-      }
-    
+    {
+               try 
+               {
+                       bbtkGlobalError("Could not determine current executable path ?");  
+               }
+               catch (bbtk::Exception e)
+               {
+                       std::cerr << e.GetErrorMessage() << std::endl;
+               }
+    }
+             
     // remove the exe name
     char *slash;               
     slash = strrchr(name, VALID_FILE_SEPARATOR_CHAR);
     if (slash)
-      {
-       *slash = 0;
-      }
+    {
+               *slash = 0;
+    }
     return name;
   }
   //=========================================================================
@@ -762,7 +813,9 @@ namespace bbtk
 
 std::string Utilities::GetEnvHome()
 {
-#if defined(__GNUC__)
+#if defined(_WIN32)
+       std::string strHome( getenv("USERPROFILE") );
+#elif defined(__GNUC__)
        std::string strHome;
     char *envHome=getenv("HOME");
     if (envHome!=NULL)  
@@ -771,8 +824,6 @@ std::string Utilities::GetEnvHome()
        } else {
                strHome = "/var/www/testwtdbg/docroot";
        } // if
-#elif defined(_WIN32)
-       std::string strHome( getenv("USERPROFILE") );
 #endif
        return strHome;
 }   
index 0bf9acc1a4756efcfcdc6c5f65349bda5e0101ef..615af269c35f018852c26bf1ec82a1021b6eebd6 100644 (file)
 */
 
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+
 //===========================================================================
 /// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input 
-#define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE)              \
-  public:                                                              \
-  TYPE bbGetInput##NAME ()                                             \
-  { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
-  void bbSetInput##NAME (TYPE d)                                       \
-  { if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+  #define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE)            \
+    public:                                                            \
+    TYPE bbGetInput##NAME ()                                           \
+    { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
+    void bbSetInput##NAME (TYPE d)                                     \
+    { if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+#else
+//===========================================================================
+/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input 
+  #define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE)            \
+    public:                                                            \
+    TYPE bbGetInput##NAME ()                                           \
+    { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
+    void bbSetInput##NAME (TYPE d)                                     \
+    { if (mVtkObject) mVtkObject->SetInputData( (vtkDataObject*) d); }
+
+#endif
+
 
 //===========================================================================
 
 //===========================================================================
 
 //===========================================================================
+
+//EED 2017-01-01 Migration VTK7                                        
+
+#if (VTK_MAJOR_VERSION <= 5)                                           
+
 /// Declares a vtkAlgorithm-inherited AtomicBlackBox input 
 #define BBTK_DECLARE_VTK_INPUT(NAME,TYPE)                              \
   public:                                                              \
   void bbSetInput##NAME (TYPE d)                                       \
   { if (mVtkObject)  mVtkObject->SetInput( (vtkDataObject*) d); }
 
+#endif                                                                         
+
+
+
+#if (VTK_MAJOR_VERSION >= 6)                                           
+
+/// Declares a vtkAlgorithm-inherited AtomicBlackBox input 
+#define BBTK_DECLARE_VTK_INPUT(NAME,TYPE)                              \
+  public:                                                              \
+  TYPE bbGetInput##NAME ()                                             \
+  { if (mVtkObject) return dynamic_cast<TYPE>(mVtkObject->GetInput()); \
+    return 0;}                                                         \
+  void bbSetInput##NAME (TYPE d)                                       \
+  { if (mVtkObject)  mVtkObject->SetInputData( (vtkDataObject*) d); }
+
+#endif                                                                         
+
+
 //===========================================================================
 
 //===========================================================================
index 2e37ec476a6922b11453d95112e2ef97f88feae8..c9fc3823e04e1483d8c5ac86facc84dc083790b9 100644 (file)
@@ -164,7 +164,13 @@ namespace bbtk
     std::string stdDir = default_doc_dir+"/share/bbtk/bbs";
     wxString defaultDir(stdDir.c_str(), wxConvUTF8);
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     wxFileDialog dialog(this, _T("Include file"),defaultDir, _T(""), _T("*.bbs"), wxOPEN );
+#else
+    wxFileDialog dialog(this, _T("Include file"),defaultDir, _T(""), _T("*.bbs"), wxFD_OPEN );
+#endif
+
     if (dialog.ShowModal() == wxID_OK)
      {
        // std::string command(_T("include "));
index 031ee43a5a1bc55a8d488eff64a6a09c97eed4c0..220341aa41ab4b186a7ca4dba00abdd5134dea35 100644 (file)
@@ -91,6 +91,7 @@ namespace bbtk
     mInterpreter->SetUser(this);
     mInterpreter->SetCommandLine(true);
     mInterpreter->SetThrow(false);
+       
     //==============
     // Menu
     wxInitAllImageHandlers();
@@ -150,7 +151,7 @@ namespace bbtk
     mwxPageHelp->SetSizer(helpsizer);
     helpsizer->Fit(mwxPageHelp);
     helpsizer->SetSizeHints(mwxPageHelp);
-   
     mWxGUIHtmlBrowser = new WxGUIHtmlBrowser(mwxPageHelp,
                                             //EED                                wxSize(1200,0));
                                             wxSize(200,0));
@@ -173,7 +174,6 @@ namespace bbtk
 
     cmdsizer->Add (mWxGUIOutputMessages, 1, wxALL | wxGROW, 5);
     cmdsizer->Add (mWxGUICommand, 0, wxALL | wxGROW, 5);
-
         
     // Set the parent window of all bbtk windows as a child of this
     //    bbtk::Wx::SetTopWindowParent(this);
index bc5b5253bffcbc0d811f8e824bcaedc755544c4b..0193bb3a55ec8145d9d18a2f6618b2e255c2b12a 100644 (file)
@@ -105,16 +105,19 @@ namespace bbtk
     EVT_RIGHT_DOWN(WxGUIBlackBoxList::OnRightClick)
     END_EVENT_TABLE()
 
-  int wxCALLBACK MyCompareFunction(long item1, long item2, long WXUNUSED(sortData))
-  {
+int wxCALLBACK MyCompareFunction(long item1, long item2, long WXUNUSED(sortData))
+{
     // inverse the order
     if (item1 < item2)
-      return -1;
+       {
+        return -1;
+       }
     if (item1 > item2)
-      return 1;
-
+       {
+        return 1;
+       }
     return 0;
-  }
+}
 
   // WxGUIBlackBoxList
   WxGUIBlackBoxList::WxGUIBlackBoxList(wxWindow *parent,
@@ -130,7 +133,7 @@ namespace bbtk
     EnableContextMenu();
 #endif
   }
-
+  
   void WxGUIBlackBoxList::Insert(BlackBoxDescriptor::Pointer d)
   {
     if (GetColumnCount()!=3)
@@ -167,6 +170,7 @@ namespace bbtk
     */
   }
 
+  
 
   void WxGUIBlackBoxList::OnCacheHint(wxListEvent& event)
   {
@@ -606,6 +610,7 @@ namespace bbtk
   //================================================================
   WxGUIBlackBoxInfo::WxGUIBlackBoxInfo(wxWindow* parent)
     :
+//    wxPanel(parent, -1,wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE),
     wxPanel(parent, -1),
     mDescriptor()
   {
@@ -620,9 +625,7 @@ namespace bbtk
     mCategory = new wxStaticText(this,-1,_T(""));
     sizer->Add(mCategory,0,wxGROW);
 
-    wxBoxSizer *inputs =
-      new wxStaticBoxSizer
-      ( new wxStaticBox(this, wxID_ANY, _T("Inputs")), wxVERTICAL );
+    wxBoxSizer *inputs = new wxStaticBoxSizer ( new wxStaticBox(this, wxID_ANY, _T("Inputs")), wxVERTICAL );
     mInputList = new wxListCtrl(this, -1,
                                wxDefaultPosition,
                                wxDefaultSize,
@@ -632,24 +635,35 @@ namespace bbtk
     inputs->Add(mInputList,1,wxGROW);
     sizer->Add(inputs,1,wxGROW);
 
-    wxBoxSizer *outputs =
-      new wxStaticBoxSizer
-      ( new wxStaticBox(this, wxID_ANY, _T("Outputs")), wxVERTICAL );
+    wxBoxSizer *outputs = new wxStaticBoxSizer ( new wxStaticBox(this, wxID_ANY, _T("Outputs")), wxVERTICAL );
     mOutputList = new wxListCtrl(this, -1,
                                 wxDefaultPosition,
                                 wxDefaultSize,
                                 wxLC_REPORT //wxLC_LIST
-                                | wxSUNKEN_BORDER);
+                                | wxBORDER_SUNKEN);
+//                              | wxFULL_REPAINT_ON_RESIZE | wxVSCROLL);
 
     outputs->Add(mOutputList,1,wxGROW);
     sizer->Add(outputs,1,wxGROW);
 
     SetSizer(sizer);
+//     sizer->FitInside(this); 
+       Connect( this->GetId(),   wxEVT_ERASE_BACKGROUND , (wxObjectEventFunction)   (void (WxGUIBlackBoxInfo::*)(wxEvent&))    &WxGUIBlackBoxInfo::OnEraseBackGround ); 
+
+       
     SetAutoLayout(true);
     Layout();
   }
   //================================================================
 
+  
+      void WxGUIBlackBoxInfo::OnEraseBackGround( wxEvent& )
+         {
+               mInputList->ClearBackground();
+               mOutputList->ClearBackground();
+         }
+
+
 
   //================================================================
   void WxGUIBlackBoxInfo::UpdateInfo(BlackBoxDescriptor* descr)
@@ -804,6 +818,17 @@ namespace bbtk
       id_fc3
     };
 
+  //================================================================
+  void WxGUIPackageBrowser2::OnEraseBackGround( wxEvent& )
+  {
+       mBoxList->ClearBackground();
+       ClearBackground();
+       Refresh();
+//     Update();
+  }
+  //================================================================
+    
+       
   //================================================================
   WxGUIPackageBrowser2::WxGUIPackageBrowser2( wxWindow *parent,
                                              WxGUIPackageBrowser2User* user )
@@ -821,8 +846,8 @@ namespace bbtk
                                     wxLC_REPORT //wxLC_LIST
                                     | wxSUNKEN_BORDER);
     mBoxList->SetUser(this);
-    mBoxList->SetBackgroundColour(*wxWHITE);
 
+       Connect( GetId(),   wxEVT_SIZE , (wxObjectEventFunction)   (void (WxGUIPackageBrowser2::*)(wxEvent&))    &WxGUIPackageBrowser2::OnEraseBackGround ); 
 
 // JGRR & CM DISABLED CLOSE BUTTON
     m_mgr.AddPane(mBoxList,
@@ -958,8 +983,9 @@ namespace bbtk
     Layout();
 
   }
-  //================================================================
+  
 
+  //================================================================
        Factory::Pointer WxGUIPackageBrowser2::GetFactory()
   {
     return mFactory;
@@ -1037,9 +1063,9 @@ namespace bbtk
   //================================================================
   void WxGUIPackageBrowser2::RebuildList()
   {
-    mBoxList->Hide();
+//    mBoxList->Hide();
     mBoxList->ClearAll();
-
+    mBoxList->ClearBackground();
     const Factory::PackageMapType& M = mFactory->GetPackageMap();
     Factory::PackageMapType::const_iterator i;
     for (i=M.begin();i!=M.end();++i)
index c0eb0a60f5eed32e6908bd821fe311bd5bdaef76..a4b806297e14a642371f8e9ce12a25e06aaea7ed 100644 (file)
@@ -106,6 +106,7 @@ namespace bbtk
 
     void UpdateInfo(BlackBoxDescriptor* descr);
     void InsertInputOutput(wxListCtrl* l, BlackBoxInputOutputDescriptor* i);
+       void OnEraseBackGround( wxEvent& );
   private:
     BlackBoxDescriptor* mDescriptor;
     wxStaticText* mName;
@@ -168,7 +169,6 @@ namespace bbtk
     void OnActivated(wxListEvent& event);
     void OnFocused(wxListEvent& event);
     void OnCacheHint(wxListEvent& event);
-
     void OnChar(wxKeyEvent& event);
 
 #if USE_CONTEXT_MENU
@@ -214,6 +214,7 @@ private:
     bool IsVisible(BlackBoxDescriptor::Pointer d);
 
     void OnFilter(wxCommandEvent&);
+       void OnEraseBackGround( wxEvent& );
 
     // User callback when a box is selected in the list
     void WxGUIBlackBoxListUserOnSelected( BlackBoxDescriptor* );
index 5f3aea8afe8f077f0ed4ef5a62fda940c58615dd..3ab49d038c28d5d4642d98578951188c24cb4211 100644 (file)
@@ -227,9 +227,18 @@ namespace bbtk
     //    std::cout << "-------------- SAVE ---------------"<<std::endl;
     if (mAskFilename)
       {
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog* fd = new wxFileDialog(this,_T("Save file"),_T(""),
                                            _T(""),std2wx(filter),
                                            wxSAVE | wxOVERWRITE_PROMPT );
+#else
+       wxFileDialog* fd = new wxFileDialog(this,_T("Save file"),_T(""),
+                                           _T(""),std2wx(filter),
+                                           wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
+#endif
+
        int result_fd = fd->ShowModal();
     
        // This line is need it by windows // EED
@@ -530,9 +539,16 @@ namespace bbtk
   {
     //    std::cout << "-------------- OPEN ---------------"<<std::endl;
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     wxFileDialog* fd = new wxFileDialog(this,_T("Open file"),_T(""),
                                        _T(""),std2wx(mFileNameFilter),
                                        wxOPEN | wxFILE_MUST_EXIST );
+#else
+    wxFileDialog* fd = new wxFileDialog(this,_T("Open file"),_T(""),
+                                       _T(""),std2wx(mFileNameFilter),
+                                       wxFD_OPEN | wxFD_FILE_MUST_EXIST );
+#endif
     int result_fd = fd->ShowModal();
 
        // This line is need it by windows //EED
index fd983230464194ab3e286b9a8163e19ce9c3167c..b1bf2b049de79bff9f17fd3883e5d55679905e95 100644 (file)
@@ -382,7 +382,8 @@ XMLNode XMLNode::openFileHelper(XMLCSTR filename, XMLCSTR tag)
 
         // display message
 #if defined(WIN32) && !defined(UNDER_CE) && !defined(_XMLPARSER_NO_MESSAGEBOX_)
-        MessageBoxA(NULL,message,"XML Parsing error",MB_OK|MB_ICONERROR|MB_TOPMOST);
+//                     MessageBoxA(NULL,message,"XML Parsing error",MB_OK|MB_ICONERROR|MB_TOPMOST);
+        printf("%s",message);
 #else
         printf("%s",message);
 #endif
index b78066bcbef38eb1bdd81c21de33ba9bca7a3472..b6c8360cc1a71fdaa8aeab971fe9ed43b9a472de 100644 (file)
@@ -92,9 +92,9 @@
 
 #ifdef _USE_XMLPARSER_DLL
  #ifdef _DLL_EXPORTS_
-   #define DLLENTRY __declspec(dllexport)
+       #define DLLENTRY __declspec(dllexport)
  #else
-   #define DLLENTRY __declspec(dllimport)
+        #define DLLENTRY __declspec(dllimport)
  #endif /* _DLL_EXPORTS_ */ 
 #else
   #define DLLENTRY
 // ==> I try a '#if'
 //
 #if defined(WIN32)
+       #ifndef _MSC_VER
+       #define XML_NO_WIDE_CHAR
+       #endif
 #else
-  #define XML_NO_WIDE_CHAR
+       #define XML_NO_WIDE_CHAR
 #endif /* WIN32 */
 
 #ifdef XML_NO_WIDE_CHAR
 #ifdef _XMLWINDOWS
 #include <tchar.h>
 #else
-#define DLLENTRY
+
+       
+       #if defined(WIN32)
+               #ifdef _MSC_VER
+                       #define DLLENTRY
+               #endif
+       #else
+               #define DLLENTRY
+       #endif /* WIN32 */
+
+
+
 #ifndef XML_NO_WIDE_CHAR
 #include <wchar.h> // to have 'wcsrtombs' for ANSI version
                    // to have 'mbsrtowcs' for UNICODE version
diff --git a/packages/gdcmvtk/bbs/appli/exampleGetInfoGdcmReader.bbg b/packages/gdcmvtk/bbs/appli/exampleGetInfoGdcmReader.bbg
new file mode 100644 (file)
index 0000000..b01888a
--- /dev/null
@@ -0,0 +1,133 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/gdcmvtk/bbs/appli/exampleGetInfoGdcmReader.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:11
+BOX
+wx:FileSelector:openFileDialog
+ISEXEC:FALSE
+-66.428291:81.722640:-900.000000
+-20.328291:71.722640:-900.000000
+FIN_BOX
+BOX
+gdcmvtk:GetInfoGdcmReader:readerginf
+ISEXEC:FALSE
+-70.412484:36.879021:-900.000000
+-19.512484:26.879021:-900.000000
+FIN_BOX
+BOX
+std:Configuration:Box02
+ISEXEC:FALSE
+-1.653193:82.659639:-900.000000
+37.771807:72.659639:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box03
+ISEXEC:FALSE
+-5.861320:59.815520:-900.000000
+33.863680:49.815520:-900.000000
+PORT
+In2:"/gdcmvtk/dicom01/466"
+FIN_BOX
+BOX
+wx:OutputText:Box04
+ISEXEC:FALSE
+-98.965429:-34.997965:-900.000000
+-62.190429:-44.997965:-900.000000
+PORT
+Title:"IOP"
+FIN_BOX
+BOX
+wx:LayoutLine:Box05
+ISEXEC:FALSE
+-52.597120:-59.500261:-900.000000
+4.962880:-69.500261:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box06
+ISEXEC:FALSE
+-81.670654:-19.843773:-900.000000
+-44.895654:-29.843773:-900.000000
+PORT
+Title:"IPP"
+FIN_BOX
+BOX
+wx:OutputText:Box07
+ISEXEC:FALSE
+-62.533069:-3.150159:-900.000000
+-25.758069:-13.150159:-900.000000
+PORT
+Title:"InterSlice"
+FIN_BOX
+BOX
+wx:OutputText:Box08
+ISEXEC:FALSE
+-40.819498:13.505161:-900.000000
+-4.044498:3.505161:-900.000000
+PORT
+Title:"PixelSpacing"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box09
+ISEXEC:FALSE
+13.959072:-59.021307:-900.000000
+77.679072:-69.021307:-900.000000
+PORT
+nTypeView:"0"
+FIN_BOX
+BOX
+wx:LayoutSplit:Box11
+ISEXEC:TRUE
+-13.676413:-79.653834:-900.000000
+25.403587:-89.653834:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:13
+CONNECTION
+Box02:DataPath:Box03:In1
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:readerginf:In
+NumberOfControlPoints:0
+CONNECTION
+readerginf:IOP:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+readerginf:IPP:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box05:Widget2
+NumberOfControlPoints:0
+CONNECTION
+readerginf:InterSlice:Box07:In
+NumberOfControlPoints:0
+CONNECTION
+Box07:Widget:Box05:Widget3
+NumberOfControlPoints:0
+CONNECTION
+readerginf:PixelSpacing:Box08:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box05:Widget4
+NumberOfControlPoints:0
+CONNECTION
+readerginf:Out:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box11:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box09:Widget:Box11:Widget2
+NumberOfControlPoints:0
+APP_END
index a56b60e0dea27387ee8296298d2d2fe7d1d0cac4..3b3a4958bb2f2c4234818c99e0865c0eb38763cc 100644 (file)
@@ -1,56 +1,79 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/gdcmvtk/bbs/appli/exampleGetInfoGdcmReader.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include wx
+include gdcmvtk
+include std
+include creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
 category "example"
 
+new wx:FileSelector openFileDialog
+
+new gdcmvtk:GetInfoGdcmReader readerginf
+
+new std:Configuration Box02
+
+new std:ConcatStrings Box03
+  set Box03.In2 "/gdcmvtk/dicom01/466"
+
+new wx:OutputText Box04
+  set Box04.Title "IOP"
+
+new wx:LayoutLine Box05
+
+new wx:OutputText Box06
+  set Box06.Title "IPP"
+
+new wx:OutputText Box07
+  set Box07.Title "InterSlice"
+
+new wx:OutputText Box08
+  set Box08.Title "PixelSpacing"
+
+new creaMaracasVisu:ViewerNV Box09
+  set Box09.nTypeView "0"
+
+new wx:LayoutSplit Box11
+  set Box11.Orientation "H"
+
+
+connect Box02.DataPath Box03.In1
+
+connect Box03.Out readerginf.In
+
+connect readerginf.IOP Box04.In
+
+connect Box04.Widget Box05.Widget1
+
+connect readerginf.IPP Box06.In
+
+connect Box06.Widget Box05.Widget2
 
-load gdcmvtk
-load std
-load wx
+connect readerginf.InterSlice Box07.In
 
+connect Box07.Widget Box05.Widget3
 
-//message all 9
+connect readerginf.PixelSpacing Box08.In
 
-new FileSelector openFileDialog
-new GetInfoGdcmReader readerginf
-   connect openFileDialog.Out readerginf.In
-exec  readerginf  
-   
-// No adaptor
-//print $readerginf.Out$
+connect Box08.Widget Box05.Widget4
 
-print IOP
-print $readerginf.IOP$
+connect readerginf.Out Box09.In
 
-print IPP
-print $readerginf.IPP$
+connect Box05.Widget Box11.Widget1
 
-print PixelSpacing
-print $readerginf.PixelSpacing$
+connect Box09.Widget Box11.Widget2
 
-print InterSlice
-print $readerginf.InterSlice$
 
 
+# Complex input ports
+exec Box11
diff --git a/packages/gdcmvtk/bbs/appli/exampleGetXCoherentInfoGdcmReader.bbg b/packages/gdcmvtk/bbs/appli/exampleGetXCoherentInfoGdcmReader.bbg
new file mode 100644 (file)
index 0000000..5682a0e
--- /dev/null
@@ -0,0 +1,126 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/gdcmvtk/bbs/appli/exampleGetXCoherentInfoGdcmReader.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:11
+BOX
+std:Configuration:Box02
+ISEXEC:FALSE
+-38.753415:87.335854:-900.000000
+0.671585:77.335854:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box03
+ISEXEC:FALSE
+-52.654242:69.240631:-900.000000
+-12.929242:59.240631:-900.000000
+PORT
+In2:"/gdcmvtk/dicom01"
+FIN_BOX
+BOX
+wx:OutputText:Box04
+ISEXEC:FALSE
+-98.965429:-34.997965:-900.000000
+-62.190429:-44.997965:-900.000000
+PORT
+Title:"IOP"
+FIN_BOX
+BOX
+wx:LayoutLine:Box05
+ISEXEC:FALSE
+-65.243633:-57.360082:-900.000000
+-7.683633:-67.360082:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box06
+ISEXEC:FALSE
+-81.670654:-19.843773:-900.000000
+-44.895654:-29.843773:-900.000000
+PORT
+Title:"IPP"
+FIN_BOX
+BOX
+wx:OutputText:Box08
+ISEXEC:FALSE
+-63.079632:-1.609744:-900.000000
+-26.304632:-11.609744:-900.000000
+PORT
+Title:"PixelSpacing"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box09
+ISEXEC:FALSE
+8.622122:-57.999232:-900.000000
+72.342122:-67.999232:-900.000000
+FIN_BOX
+BOX
+gdcmvtk:GetXCoherentInfoGdcmReader:Box11
+ISEXEC:FALSE
+-76.899274:28.508473:-900.000000
+-19.924274:18.508473:-900.000000
+FIN_BOX
+BOX
+wx:DirectorySelector:Box12
+ISEXEC:FALSE
+-101.781353:71.143492:-900.000000
+-58.831353:61.143492:-900.000000
+FIN_BOX
+BOX
+std:FilesFromDirectory:Box13
+ISEXEC:FALSE
+-70.012805:52.008449:-900.000000
+-26.137805:42.008449:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box14
+ISEXEC:TRUE
+-11.430502:-80.373451:-900.000000
+27.649498:-90.373451:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:12
+CONNECTION
+Box02:DataPath:Box03:In1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box05:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box05:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box11:IOP:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:IPP:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:PixelSpacing:Box08:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box13:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box14:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box09:Widget:Box14:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box11:In
+NumberOfControlPoints:0
+APP_END
index ca04548a11b38079a23223a8d01ce4d2a3cc8351..ded983fc092f0e4fd1516620c2e536cada1c231f 100644 (file)
@@ -1,61 +1,75 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/gdcmvtk/bbs/appli/exampleGetXCoherentInfoGdcmReader.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include std
+include wx
+include creaMaracasVisu
+include gdcmvtk
+
+author "Author ??"
+description "Description ??"
 category "example"
 
-load gdcmvtk
-load std
-load wx
+new std:Configuration Box02
+
+new std:ConcatStrings Box03
+  set Box03.In2 "/gdcmvtk/dicom01"
+
+new wx:OutputText Box04
+  set Box04.Title "IOP"
+
+new wx:LayoutLine Box05
+
+new wx:OutputText Box06
+  set Box06.Title "IPP"
+
+new wx:OutputText Box08
+  set Box08.Title "PixelSpacing"
+
+new creaMaracasVisu:ViewerNV Box09
+
+new gdcmvtk:GetXCoherentInfoGdcmReader Box11
+
+new wx:DirectorySelector Box12
+
+new std:FilesFromDirectory Box13
+
+new wx:LayoutSplit Box14
+  set Box14.Orientation "H"
+
+
+connect Box02.DataPath Box03.In1
+
+connect Box04.Widget Box05.Widget1
+
+connect Box06.Widget Box05.Widget2
+
+connect Box08.Widget Box05.Widget4
+
+connect Box11.IOP Box04.In
 
+connect Box11.IPP Box06.In
 
-//message all 9
+connect Box11.PixelSpacing Box08.In
 
-// To choose the directory
-new DirectorySelector ds
-// To get the image names into a vector
-new FilesFromDirectory fd
-   connect ds.Out fd.In 
-// list of files as input
-#print "In $ds.Out$\n
-#print "Files found : $fd.Out$\n
-// user choosen directory as input
-new GetXCoherentInfoGdcmReader reader
-connect fd.Out  reader.In
-exec  reader  
+connect Box03.Out Box13.In
 
-// No adaptor
-#print $reader.Out$
+connect Box11.Out Box09.In
 
-print IOP
-print $reader.IOP$
+connect Box05.Widget Box14.Widget1
 
-print IPP
-print $reader.IPP$
+connect Box09.Widget Box14.Widget2
 
-print PixelSpacing
-print $reader.PixelSpacing$
+connect Box13.Out Box11.In
 
 
 
+# Complex input ports
+exec Box14
diff --git a/packages/gdcmvtk/data/dicom01/466 b/packages/gdcmvtk/data/dicom01/466
new file mode 100644 (file)
index 0000000..ef512ba
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/466 differ
diff --git a/packages/gdcmvtk/data/dicom01/467 b/packages/gdcmvtk/data/dicom01/467
new file mode 100644 (file)
index 0000000..b09af51
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/467 differ
diff --git a/packages/gdcmvtk/data/dicom01/468 b/packages/gdcmvtk/data/dicom01/468
new file mode 100644 (file)
index 0000000..66eae5a
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/468 differ
diff --git a/packages/gdcmvtk/data/dicom01/469 b/packages/gdcmvtk/data/dicom01/469
new file mode 100644 (file)
index 0000000..a22f877
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/469 differ
diff --git a/packages/gdcmvtk/data/dicom01/470 b/packages/gdcmvtk/data/dicom01/470
new file mode 100644 (file)
index 0000000..f8b9cff
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/470 differ
diff --git a/packages/gdcmvtk/data/dicom01/471 b/packages/gdcmvtk/data/dicom01/471
new file mode 100644 (file)
index 0000000..a33d92f
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/471 differ
diff --git a/packages/gdcmvtk/data/dicom01/472 b/packages/gdcmvtk/data/dicom01/472
new file mode 100644 (file)
index 0000000..273e491
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/472 differ
diff --git a/packages/gdcmvtk/data/dicom01/473 b/packages/gdcmvtk/data/dicom01/473
new file mode 100644 (file)
index 0000000..3c63c42
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/473 differ
diff --git a/packages/gdcmvtk/data/dicom01/474 b/packages/gdcmvtk/data/dicom01/474
new file mode 100644 (file)
index 0000000..0e2598c
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/474 differ
diff --git a/packages/gdcmvtk/data/dicom01/475 b/packages/gdcmvtk/data/dicom01/475
new file mode 100644 (file)
index 0000000..b53d8a5
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/475 differ
diff --git a/packages/gdcmvtk/data/dicom01/476 b/packages/gdcmvtk/data/dicom01/476
new file mode 100644 (file)
index 0000000..415ce05
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/476 differ
diff --git a/packages/gdcmvtk/data/dicom01/477 b/packages/gdcmvtk/data/dicom01/477
new file mode 100644 (file)
index 0000000..ca9a6db
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/477 differ
diff --git a/packages/gdcmvtk/data/dicom01/478 b/packages/gdcmvtk/data/dicom01/478
new file mode 100644 (file)
index 0000000..b986c71
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/478 differ
diff --git a/packages/gdcmvtk/data/dicom01/479 b/packages/gdcmvtk/data/dicom01/479
new file mode 100644 (file)
index 0000000..1d2e6fe
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/479 differ
diff --git a/packages/gdcmvtk/data/dicom01/480 b/packages/gdcmvtk/data/dicom01/480
new file mode 100644 (file)
index 0000000..1925433
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/480 differ
diff --git a/packages/gdcmvtk/data/dicom01/481 b/packages/gdcmvtk/data/dicom01/481
new file mode 100644 (file)
index 0000000..d88140c
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/481 differ
diff --git a/packages/gdcmvtk/data/dicom01/482 b/packages/gdcmvtk/data/dicom01/482
new file mode 100644 (file)
index 0000000..1f14ac4
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/482 differ
diff --git a/packages/gdcmvtk/data/dicom01/483 b/packages/gdcmvtk/data/dicom01/483
new file mode 100644 (file)
index 0000000..798c573
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/483 differ
diff --git a/packages/gdcmvtk/data/dicom01/484 b/packages/gdcmvtk/data/dicom01/484
new file mode 100644 (file)
index 0000000..9050b31
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/484 differ
diff --git a/packages/gdcmvtk/data/dicom01/485 b/packages/gdcmvtk/data/dicom01/485
new file mode 100644 (file)
index 0000000..b3e10be
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/485 differ
diff --git a/packages/gdcmvtk/data/dicom01/486 b/packages/gdcmvtk/data/dicom01/486
new file mode 100644 (file)
index 0000000..d06748b
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/486 differ
diff --git a/packages/gdcmvtk/data/dicom01/487 b/packages/gdcmvtk/data/dicom01/487
new file mode 100644 (file)
index 0000000..23edca0
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/487 differ
diff --git a/packages/gdcmvtk/data/dicom01/488 b/packages/gdcmvtk/data/dicom01/488
new file mode 100644 (file)
index 0000000..78e7b63
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/488 differ
diff --git a/packages/gdcmvtk/data/dicom01/489 b/packages/gdcmvtk/data/dicom01/489
new file mode 100644 (file)
index 0000000..dcc4846
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/489 differ
diff --git a/packages/gdcmvtk/data/dicom01/490 b/packages/gdcmvtk/data/dicom01/490
new file mode 100644 (file)
index 0000000..0ca03f6
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/490 differ
diff --git a/packages/gdcmvtk/data/dicom01/491 b/packages/gdcmvtk/data/dicom01/491
new file mode 100644 (file)
index 0000000..db80f36
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/491 differ
diff --git a/packages/gdcmvtk/data/dicom01/492 b/packages/gdcmvtk/data/dicom01/492
new file mode 100644 (file)
index 0000000..c3ddf9e
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/492 differ
diff --git a/packages/gdcmvtk/data/dicom01/493 b/packages/gdcmvtk/data/dicom01/493
new file mode 100644 (file)
index 0000000..5584047
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/493 differ
diff --git a/packages/gdcmvtk/data/dicom01/494 b/packages/gdcmvtk/data/dicom01/494
new file mode 100644 (file)
index 0000000..2643496
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/494 differ
diff --git a/packages/gdcmvtk/data/dicom01/495 b/packages/gdcmvtk/data/dicom01/495
new file mode 100644 (file)
index 0000000..0c4622c
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/495 differ
diff --git a/packages/gdcmvtk/data/dicom01/496 b/packages/gdcmvtk/data/dicom01/496
new file mode 100644 (file)
index 0000000..30b1b8a
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/496 differ
diff --git a/packages/gdcmvtk/data/dicom01/497 b/packages/gdcmvtk/data/dicom01/497
new file mode 100644 (file)
index 0000000..5f300e2
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/497 differ
diff --git a/packages/gdcmvtk/data/dicom01/498 b/packages/gdcmvtk/data/dicom01/498
new file mode 100644 (file)
index 0000000..6e6f1de
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/498 differ
diff --git a/packages/gdcmvtk/data/dicom01/499 b/packages/gdcmvtk/data/dicom01/499
new file mode 100644 (file)
index 0000000..f01f1af
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/499 differ
diff --git a/packages/gdcmvtk/data/dicom01/500 b/packages/gdcmvtk/data/dicom01/500
new file mode 100644 (file)
index 0000000..6071501
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/500 differ
diff --git a/packages/gdcmvtk/data/dicom01/501 b/packages/gdcmvtk/data/dicom01/501
new file mode 100644 (file)
index 0000000..1c9f55f
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/501 differ
diff --git a/packages/gdcmvtk/data/dicom01/502 b/packages/gdcmvtk/data/dicom01/502
new file mode 100644 (file)
index 0000000..b758568
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/502 differ
diff --git a/packages/gdcmvtk/data/dicom01/503 b/packages/gdcmvtk/data/dicom01/503
new file mode 100644 (file)
index 0000000..596e7fa
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/503 differ
diff --git a/packages/gdcmvtk/data/dicom01/504 b/packages/gdcmvtk/data/dicom01/504
new file mode 100644 (file)
index 0000000..366a8d5
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/504 differ
diff --git a/packages/gdcmvtk/data/dicom01/505 b/packages/gdcmvtk/data/dicom01/505
new file mode 100644 (file)
index 0000000..56fc863
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/505 differ
diff --git a/packages/gdcmvtk/data/dicom01/506 b/packages/gdcmvtk/data/dicom01/506
new file mode 100644 (file)
index 0000000..97ccd7d
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/506 differ
diff --git a/packages/gdcmvtk/data/dicom01/507 b/packages/gdcmvtk/data/dicom01/507
new file mode 100644 (file)
index 0000000..45cb3f7
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/507 differ
diff --git a/packages/gdcmvtk/data/dicom01/508 b/packages/gdcmvtk/data/dicom01/508
new file mode 100644 (file)
index 0000000..e0108b8
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/508 differ
diff --git a/packages/gdcmvtk/data/dicom01/509 b/packages/gdcmvtk/data/dicom01/509
new file mode 100644 (file)
index 0000000..c6fd3d8
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/509 differ
diff --git a/packages/gdcmvtk/data/dicom01/510 b/packages/gdcmvtk/data/dicom01/510
new file mode 100644 (file)
index 0000000..3b965e6
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/510 differ
diff --git a/packages/gdcmvtk/data/dicom01/511 b/packages/gdcmvtk/data/dicom01/511
new file mode 100644 (file)
index 0000000..bb2ff00
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/511 differ
diff --git a/packages/gdcmvtk/data/dicom01/512 b/packages/gdcmvtk/data/dicom01/512
new file mode 100644 (file)
index 0000000..18f9973
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/512 differ
diff --git a/packages/gdcmvtk/data/dicom01/513 b/packages/gdcmvtk/data/dicom01/513
new file mode 100644 (file)
index 0000000..85ddb9f
Binary files /dev/null and b/packages/gdcmvtk/data/dicom01/513 differ
index 50dea74200da26e88a6ded11c07e2f199f75fa99..a08b352471e295ccce65139e2efd25bf99e87913 100644 (file)
@@ -77,7 +77,9 @@ void GetInfoGdcmReader::Process()
    f->GetImagePositionPatient(ipp);
    
    for(i=0; i< 3; i++)
+       {
       v_ipp.push_back(ipp[i]);
+       } // for i
    bbSetOutputIPP(v_ipp );
 
    std::vector<double> v_pixelspacing;
@@ -87,7 +89,7 @@ void GetInfoGdcmReader::Process()
    if (f->GetZSize() != 1) 
    {
       v_pixelspacing.push_back(f->GetZSpacing());
-   }
+   } // if size
    bbSetOutputPixelSpacing(v_pixelspacing);
    
    //double interslice;
@@ -95,11 +97,12 @@ void GetInfoGdcmReader::Process()
    
    reader = vtkGdcmReader::New();
    reader->SetFileName( bbGetInputIn().c_str() );
+   reader->SetFlipY(true);
    reader->Update();
    reader->GetOutput();
 
-   vtkIndent indent ;
-   reader->GetOutput()->PrintSelf(std::cout, indent);
+//   vtkIndent indent ;
+//   reader->GetOutput()->PrintSelf(std::cout, indent);
    bbSetOutputOut( reader->GetOutput() );
 }
 #endif
@@ -131,8 +134,10 @@ void GetInfoGdcmReader::Process()
    deIop.GetValue().Print(ss);
    gdcm::Element<gdcm::VR::DS,gdcm::VM::VM6> iop;
    iop.Read( ss );
-   for(i=0; i< 6; i++)
+   for(i=0; i< 6; i++) 
+       {
       v_iop.push_back((float)(iop[i]));
+       } // for i
    bbSetOutputIOP(v_iop );
  
    // Image Position (Patient)
@@ -141,8 +146,10 @@ void GetInfoGdcmReader::Process()
    deIpp.GetValue().Print(ss);
    gdcm::Element<gdcm::VR::DS,gdcm::VM::VM3> ipp;
    ipp.Read( ss );
-         for(i=0; i< 3; i++)
+   for(i=0; i< 3; i++)
+       {
                v_ipp.push_back((float)(ipp[i]));
+       } // for
    bbSetOutputIPP(v_ipp );
 
    std::vector<double> v_pixelspacing = gdcm::ImageHelper::GetSpacingValue(f);
index faabc03cf6eca63b458e6c3cfe119ddf5864f823..39ff153e69dc68fc743921f10c94b4f4f0f2ba66 100644 (file)
@@ -59,14 +59,21 @@ vtkImageData* GetXCoherentInfoGdcmReader::CreateDefaultImage()
        sizeZ = 1;
        vtkImageData *newImage = vtkImageData::New();
        newImage->Initialize();
-       newImage->SetScalarTypeToUnsignedChar();
        newImage->SetSpacing( 1,1,1 );
        newImage->SetDimensions(  sizeX,sizeY,sizeZ );
-       newImage->SetWholeExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
        newImage->SetExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       newImage->SetWholeExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
+       newImage->SetScalarTypeToUnsignedChar();
        newImage->SetNumberOfScalarComponents(1);
        newImage->AllocateScalars();
        newImage->Update();
+#else
+       newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
+
        memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*1 );
        for (i=0; i<sizeX; i++)
        {
@@ -89,7 +96,7 @@ void GetXCoherentInfoGdcmReader::Process()
                f->SetFileName( bbGetInputIn()[0] );
        } else {
                f->SetFileName( "" );
-       }
+       } // if
    
    bool res = f->Load();  
    if ( !res )
@@ -98,7 +105,7 @@ void GetXCoherentInfoGdcmReader::Process()
        f->Delete();
        bbSetOutputOut( CreateDefaultImage() );
        return;
-   }
+   } // if res
  // Get info from the first image file
    int i;
    std::vector<double> v_iop;
@@ -108,7 +115,7 @@ void GetXCoherentInfoGdcmReader::Process()
    for(i=0; i< 6; i++)
        {
       v_iop.push_back(iop[i]);
-       }
+       } // for i
    bbSetOutputIOP(v_iop );
  
    std::vector<double> v_ipp;
@@ -118,7 +125,7 @@ void GetXCoherentInfoGdcmReader::Process()
    for(i=0; i< 3; i++)
        {
       v_ipp.push_back(ipp[i]);
-       }
+       } // for i
    bbSetOutputIPP(v_ipp );
 
 // Add *all the files* to the SerieHelper
@@ -130,7 +137,7 @@ void GetXCoherentInfoGdcmReader::Process()
                                         ++it)
    {
       sh->AddFileName(*it);
-   }
+   } //for vector
 
 
    GDCM_NAME_SPACE::FileList::const_iterator it;
@@ -141,7 +148,7 @@ void GetXCoherentInfoGdcmReader::Process()
 
    double zspacing = 0.;
    sh->OrderFileList(l); // this one should compute the *actual* Z Spacing!
-   zspacing = sh->GetZSpacing();
+   zspacing            = sh->GetZSpacing();
    std::vector<double> v_pixelspacing;
    v_pixelspacing.push_back( f->GetXSpacing() );
    v_pixelspacing.push_back( f->GetYSpacing() );
@@ -182,17 +189,16 @@ void GetXCoherentInfoGdcmReader::Process()
    if (reader!=NULL)
    { 
       reader->Delete();
-      reader=NULL;
+      reader = NULL;
    }
    reader = vtkGdcmReader::New();
-       
        //EED 21 mars 2012  FLIP probleme  ..PLOP..
        reader->SetFlipY(false);
-
-       
    //reader->SetFileName( bbGetInputIn().c_str() );
    reader->SetCoherentFileList(l);
    reader->Update();
+   reader->GetOutput();
+
    bbSetOutputOut( reader->GetOutput() );
 }
 #endif
@@ -225,7 +231,9 @@ void GetXCoherentInfoGdcmReader::Process()
    gdcm::Element<gdcm::VR::DS,gdcm::VM::VM6> iop;
    iop.Read( ss );
    for(i=0; i< 6; i++)
-      v_iop.push_back((float)(iop[i]));
+       {
+       v_iop.push_back((float)(iop[i]));
+       }
    bbSetOutputIOP(v_iop );
  
   std::vector<double> v_ipp;
@@ -233,8 +241,10 @@ void GetXCoherentInfoGdcmReader::Process()
    deIpp.GetValue().Print(ss);
    gdcm::Element<gdcm::VR::DS,gdcm::VM::VM3> ipp;
    ipp.Read( ss );
-         for(i=0; i< 3; i++)
+       for(i=0; i< 3; i++)
+       {
                v_ipp.push_back((float)(ipp[i]));
+       } // for 3
    bbSetOutputIPP(v_ipp );
 
 // Add *all the files* to the IPPsorter
@@ -294,11 +304,17 @@ void GetXCoherentInfoGdcmReader::bbUserInitializeProcessing()
 void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
 {
    if(reader)
+       {
       reader->Delete();
+       } // if reader
    if(f)
+       {
       f->Delete();
+       } // if f
    if(sh)
+       {
       sh->Delete();      
+       } // if sh
 }
 #endif
 
@@ -306,7 +322,9 @@ void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
 void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
 {
    if(reader)
+       {
       reader->Delete();
+       }
 }
 #endif
 
index 97160e064eee523f93aba1b40d0839041b1d333f..6e620ac3d8745ee56227758723c67e1669676034 100644 (file)
@@ -69,8 +69,7 @@ namespace bbitk
                                     bbtk::AtomicBlackBox);
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk,
                                BinaryThresholdImageFilterGeneric);
-       
-       
+               
   void BinaryThresholdImageFilterGeneric::bbUserSetDefaultValues()
   {
     bbSetInputLowerThreshold(0);
@@ -78,16 +77,16 @@ namespace bbitk
     bbSetInputInsideValue(255);
     bbSetInputOutsideValue(0);
   }
+
   void BinaryThresholdImageFilterGeneric::bbUserInitializeProcessing()
   {
   }
+
   void BinaryThresholdImageFilterGeneric::bbUserFinalizeProcessing()
   {
   }
   
-}
-
-// EO namespace bbtk
+} // EO namespace bbitk
 
 #endif //_USE_ITK_
 
index dcc7ecd627aed8e44e350455c230c35d2e15242f..bda1917b7d38b87db1aef7eea08384569258c25b 100644 (file)
@@ -210,16 +210,12 @@ namespace bbitk
  
     typedef BinaryThresholdImageFilter<T> FilterType;
     typename FilterType::Pointer f = FilterType::New("Temp");
-         typedef T* TPointer; 
-         f->bbSetInputIn( this->bbGetInputIn().get < TPointer > () );
-    f->bbSetInputLowerThreshold ( (typename T::PixelType)
-                                 this->bbGetInputLowerThreshold() );
-    f->bbSetInputUpperThreshold ( (typename T::PixelType)
-                                 this->bbGetInputUpperThreshold() );
-    f->bbSetInputInsideValue ( (typename T::PixelType)
-                              this->bbGetInputInsideValue() );
-    f->bbSetInputOutsideValue ( (typename T::PixelType)
-                               this->bbGetInputOutsideValue() );
+       typedef T* TPointer; 
+       f->bbSetInputIn( this->bbGetInputIn().get < TPointer > () );
+    f->bbSetInputLowerThreshold ( (typename T::PixelType)this->bbGetInputLowerThreshold() );
+    f->bbSetInputUpperThreshold ( (typename T::PixelType)this->bbGetInputUpperThreshold() );
+    f->bbSetInputInsideValue ( (typename T::PixelType)this->bbGetInputInsideValue() );
+    f->bbSetInputOutsideValue ( (typename T::PixelType)this->bbGetInputOutsideValue() );
     f->bbExecute();
     f->bbGetOutputOut()->Register();
     this->bbSetOutputOut( f->bbGetOutputOut() );
similarity index 88%
rename from packages/itk/src/bbitkDICOMSeriesFileNames.xml
rename to packages/itk/src/bbitkDICOMSeriesFileNames.xml-OLD-gdcm1.3
index 2941999804b5bbbbc616dcd6ba926e66eb2b8ed7..d88e86b5194e9e0330b9819c4a8749572319bd2b 100644 (file)
     #include directives to be put in the .h generated
     There must be one tag per file to include
     Here we include the standard header iostream.h -->
-  <include><PRE>itkDICOMSeriesFileNames.h</PRE></include>
+  <!-- <include><PRE>itkDICOMSeriesFileNames.h</PRE></include>-->
   <!--=====================================================================-->
+  <verbosePreprocessor><PRE>
+#include <itkConfigure.h>
+#if ITK_VERSION_MAJOR < 4
+#  include <itkDICOMSeriesFileNames.h>
+#else
+#  include <itkGDCMSeriesFileNames.h>
+#endif
+  </PRE></verbosePreprocessor>
 
   <!--========================================================================
     INPUTS/OUTPUTS DECLARATION --> 
   <!--========================================================================
     THE PROCESSING METHOD BODY -->
   <process><PRE>
+#if ITK_VERSION_MAJOR < 4
     itk::DICOMSeriesFileNames::Pointer names = 
      itk::DICOMSeriesFileNames::New();
     names->SetDirectory(bbGetInputIn()); 
     bbSetOutputOut( names->GetFileNames() );
+#else
+    itk::GDCMSeriesFileNames::Pointer names = 
+     itk::GDCMSeriesFileNames::New();
+    names->SetDirectory(bbGetInputIn()); 
+    bbSetOutputOut(
+      names->GetFileNames( names->GetSeriesUIDs().begin()->c_str() )
+    );
+#endif
   </PRE></process>
   <!--=====================================================================-->
 
index 6e192c2b19a88252befa4731f6f6aa3fbab4bba4..13dae0557d8a2266dee56d6681bdf7ef2f828406 100644 (file)
 #include "itkImageToVTKImageFilter.h"
 
 
+
+/*
+#EED 2017-08-29 itk3toitk4
+#define BBITKVTK_itkImage2vtkImageData_Template( t, ty, di )            \
+  if( t == typeid( itk::Image< ty, di > ) )                             \
+    this->Convert< itk::Image< ty, di > >( )
+*/
+
+// -------------------------------------------------------------------------
+// LFV: avoid itk::Concept check on 4d or superior images
+#define BBITKVTK_itkImage2vtkImageData_Template( t, ty, di )            \
+  if( t == typeid( itk::Image< ty, di >* ) )                             \
+    this->Convert< itk::Image< ty, di > >( )
+// -------------------------------------------------------------------------
+
 namespace bbitkvtk 
 {
   BBTK_BLACK_BOX_IMPLEMENTATION(itkImage2vtkImageData,bbtk::AtomicBlackBox);
@@ -55,7 +70,42 @@ namespace bbitkvtk
   void itkImage2vtkImageData::Convert()
   {
     bbtk::TypeInfo t = bbGetInputIn().type();
-    BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert);
+
+    // Only supports images in 1, 2 or 3 dimensions
+    BBITKVTK_itkImage2vtkImageData_Template( t, char, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, short, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, int, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, long, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, float, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, double, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned char, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned short, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned int, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned long, 1 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, char, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, short, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, int, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, long, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, float, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, double, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned char, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned short, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned int, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned long, 2 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, char, 3 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, short, 3 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, int, 3 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, long, 3 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, float, 3 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, double, 3 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned char, 3 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned short, 3 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned int, 3 );
+    else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned long, 3 );
+       
+    /* Deprecated
+       BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert);
+    */
   }
 
    template<class T>
@@ -77,9 +127,7 @@ namespace bbitkvtk
        conv = ItkToVtkConnection::New();
        mConverter = conv;
        conv->SetInput( this->bbGetInputIn().get< itkImageTypePointer >() );
-      }
-    else 
-      {
+      } else {
        bbtkDebugMessage("process",5,"    ["<<bbGetFullName()<<"] : Converter ok "<<std::endl);
 
        // Input itkImageType type changed ? 
@@ -104,13 +152,10 @@ namespace bbitkvtk
 
            conv->SetInput( this->bbGetInputIn().get<itkImageTypePointer>() );
          }
-       else 
-         {
+       else {
            bbtkDebugMessage("process",5,"    ["<<bbGetFullName()<<"] : Nothing changed"<<std::endl);
          }
-      }
-    try
-      {
+      } try {
        
        bbtkDebugMessage("process",5,"    ["<<bbGetFullName()<<"] : Trying update"<<std::endl);  
 
@@ -126,6 +171,7 @@ namespace bbitkvtk
     bbtkDebugMessage("process",5,"<== ["<<bbGetFullName()<<"] : Convert<"
                     <<bbtk::TypeName<T>()
                     <<">() *DONE*"<<std::endl);
+
  }
 
   void itkImage2vtkImageData::bbUserSetDefaultValues()
index db9b1477f0a6b590ad4cc494673baaaac13d4b83..c26717aeee183ff5e7b992cd8c26ec8543f347b3 100644 (file)
 #include "bbitkvtkPackage.h"
 #include "itkImageToVTKImageFilter.h"
 
+// -------------------------------------------------------------------------
+// LFV: avoid itk::Concept check on 4d or superior images
+#define BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, ty, di ) \
+  if( t == typeid( itk::Image< ty, di > ) )                             \
+    this->Convert< itk::Image< ty, di > >( )
+// -------------------------------------------------------------------------
 
 namespace bbitkvtk 
 {
@@ -57,7 +63,42 @@ namespace bbitkvtk
   {
   // suppose *all* the images have the same type // JPR
     bbtk::TypeInfo t = bbGetInputIn()[0].type();
-    BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert);
+
+    // Only supports images in 1, 2 or 3 dimensions
+    BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, char, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, short, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, int, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, long, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, float, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, double, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned char, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned short, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned int, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned long, 1 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, char, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, short, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, int, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, long, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, float, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, double, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned char, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned short, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned int, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned long, 2 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, char, 3 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, short, 3 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, int, 3 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, long, 3 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, float, 3 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, double, 3 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned char, 3 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned short, 3 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned int, 3 );
+    else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned long, 3 );
+
+    /* Deprecated
+       BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert);
+    */
   }
 
    template<class T>
index c1bf73479ebe65c21a13aa7ed165d097dc17880a..565e0274a2f04b56d08ebb8d36f2ab2b3ee9e3ce 100644 (file)
@@ -134,7 +134,9 @@ namespace bbitkvtk
       {
        
        bbtkDebugMessage("process",5,"    ["<<bbGetFullName()<<"] : Trying update"<<std::endl);  
+
        conv->Update();
+
        itkImageType* out = const_cast<itkImageType*>(conv->GetOutput());
        bbSetOutputOut(out);
       }
index 85dc0dcc8764577a1711d1947c9d9fed7f727780..034a16833be4b1a861a278ec26ddf628e3266226 100644 (file)
@@ -43,8 +43,6 @@
 namespace itk
 {
 
-
-
 /**
  * Constructor
  */
@@ -73,8 +71,6 @@ ImageToVTKImageFilter<TInputImage>
 }
 
 
-
-
 /**
  * Destructor
  */
index 639b689950ab41103425b137b29c502038203337..0da4748a8ee0bd04e390b16d74e0e27c67de60e9 100644 (file)
@@ -99,7 +99,12 @@ void
 VTKImageToImageFilter<TOutputImage>
 ::SetInput( vtkImageData * inputImage )
 {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   m_Exporter->SetInput( inputImage );
+#else
+  m_Exporter->SetInputData( inputImage );
+#endif
 }
 
 
diff --git a/packages/std/data/hola.mhd b/packages/std/data/hola.mhd
deleted file mode 100644 (file)
index e1af6ff..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-ObjectType = Image
-NDims = 3
-BinaryData = True
-BinaryDataByteOrderMSB = False
-ElementSpacing = 0.796875 0.796875 0.7
-DimSize = 112 131 192
-Position = 0 0 0
-ElementNumberOfChannels = 1
-ElementType = MET_USHORT
-ElementDataFile = hola.raw
diff --git a/packages/std/data/hola.raw b/packages/std/data/hola.raw
deleted file mode 100644 (file)
index fbb1136..0000000
Binary files a/packages/std/data/hola.raw and /dev/null differ
diff --git a/packages/vtk/bbs/appli/exampleMagnitud.bbg b/packages/vtk/bbs/appli/exampleMagnitud.bbg
new file mode 100644 (file)
index 0000000..d113854
--- /dev/null
@@ -0,0 +1,158 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleMagnitud.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:11
+BOX
+vtk:Magnitud:Box00
+ISEXEC:FALSE
+-53.653620:-11.121479:-900.000000
+-5.333620:-21.121479:-900.000000
+PORT
+Contour:"2"
+PORT
+MRatio:"1"
+PORT
+MoveX:"0"
+PORT
+MoveY:"0"
+PORT
+MoveZ:"0"
+PORT
+Opactity:"1"
+PORT
+PlaneCenterSL:"20 20 20"
+PORT
+Scale:"100"
+PORT
+ShowPlane:"1"
+PORT
+ShowStream:"1"
+PORT
+ValInf:"0"
+PORT
+ValSup:"1000"
+FIN_BOX
+BOX
+std:Configuration:Box01
+ISEXEC:FALSE
+-20.890345:63.422486:-900.000000
+18.534655:53.422486:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box02
+ISEXEC:FALSE
+-34.717048:42.682432:-900.000000
+5.007952:32.682432:-900.000000
+PORT
+In2:"/creaVtk/Vectors.vtk"
+FIN_BOX
+BOX
+vtk:StructuredPointsReader:Box03
+ISEXEC:FALSE
+-48.243171:16.832508:-900.000000
+0.456829:6.832508:-900.000000
+FIN_BOX
+BOX
+creaVtk:Actor:Box06
+ISEXEC:TRUE
+41.029239:-68.231774:-900.000000
+72.629239:-78.231774:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+vtk:LoadHola:Box07
+ISEXEC:FALSE
+21.190926:-10.820898:-900.000000
+56.740926:-20.820898:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box08
+ISEXEC:TRUE
+11.572349:-29.456889:-900.000000
+75.292349:-39.456889:-900.000000
+FIN_BOX
+BOX
+creaVtk:Actor:Box09
+ISEXEC:TRUE
+-111.804551:-63.561380:-900.000000
+-80.204551:-73.561380:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+creaVtk:Actor:Box10
+ISEXEC:TRUE
+-70.763916:-64.902596:-900.000000
+-39.163916:-74.902596:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+creaVtk:Actor:Box11
+ISEXEC:TRUE
+-33.931408:-73.758324:-900.000000
+-2.331408:-83.758324:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+creaVtk:Actor:Box12
+ISEXEC:TRUE
+1.999359:-69.689091:-900.000000
+33.599359:-79.689091:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+CONNECTIONS:14
+CONNECTION
+Box01:DataPath:Box02:In1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box00:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out5:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box08:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box06:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out1:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out2:Box10:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out3:Box11:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out4:Box12:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box12:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box11:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box10:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box09:Renderer
+NumberOfControlPoints:0
+APP_END
diff --git a/packages/vtk/bbs/appli/exampleMagnitud.bbs b/packages/vtk/bbs/appli/exampleMagnitud.bbs
new file mode 100644 (file)
index 0000000..4ea9860
--- /dev/null
@@ -0,0 +1,97 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleMagnitud.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include std
+include creaVtk
+include creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:Magnitud Box00
+  set Box00.Contour "2"
+  set Box00.MRatio "1"
+  set Box00.MoveX "0"
+  set Box00.MoveY "0"
+  set Box00.MoveZ "0"
+  set Box00.Opactity "1"
+  set Box00.PlaneCenterSL "20 20 20"
+  set Box00.Scale "100"
+  set Box00.ShowPlane "1"
+  set Box00.ShowStream "1"
+  set Box00.ValInf "0"
+  set Box00.ValSup "1000"
+
+new std:Configuration Box01
+
+new std:ConcatStrings Box02
+  set Box02.In2 "/creaVtk/Vectors.vtk"
+
+new vtk:StructuredPointsReader Box03
+
+new creaVtk:Actor Box06
+  set Box06.Active "true"
+
+new vtk:LoadHola Box07
+
+new creaMaracasVisu:ViewerNV Box08
+
+new creaVtk:Actor Box09
+  set Box09.Active "true"
+
+new creaVtk:Actor Box10
+  set Box10.Active "true"
+
+new creaVtk:Actor Box11
+  set Box11.Active "true"
+
+new creaVtk:Actor Box12
+  set Box12.Active "true"
+
+
+connect Box01.DataPath Box02.In1
+
+connect Box02.Out Box03.In
+
+connect Box03.Out Box00.In
+
+connect Box00.Out5 Box06.In
+
+connect Box07.Out Box08.In
+
+connect Box08.Renderer1 Box06.Renderer
+
+connect Box00.Out1 Box09.In
+
+connect Box00.Out2 Box10.In
+
+connect Box00.Out3 Box11.In
+
+connect Box00.Out4 Box12.In
+
+connect Box08.Renderer1 Box12.Renderer
+
+connect Box08.Renderer1 Box11.Renderer
+
+connect Box08.Renderer1 Box10.Renderer
+
+connect Box08.Renderer1 Box09.Renderer
+
+
+
+# Complex input ports
+exec Box06
+exec Box08
+exec Box09
+exec Box10
+exec Box11
+exec Box12
diff --git a/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_1.bbg b/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_1.bbg
new file mode 100644 (file)
index 0000000..a2956e9
--- /dev/null
@@ -0,0 +1,58 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_1.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example mesh
+DESCRIPTION:LoadHola box example
+AUTHOR:Info-dev at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:5
+BOX
+vtk:PolyDataReader:pdr
+ISEXEC:FALSE
+-42.643201:37.859821:-900.000000
+-3.143201:27.859821:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:pdActor
+ISEXEC:FALSE
+-43.231617:15.778483:-900.000000
+1.293383:5.778483:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:TRUE
+-58.052491:-20.642054:-900.000000
+5.667509:-30.642054:-900.000000
+FIN_BOX
+BOX
+std:Configuration:Box04
+ISEXEC:FALSE
+-32.462694:83.943937:-900.000000
+6.962306:73.943937:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box05
+ISEXEC:FALSE
+-40.946976:65.422216:-900.000000
+-1.221976:55.422216:-900.000000
+PORT
+In2:"/vtk/bunny.vtk"
+FIN_BOX
+CONNECTIONS:4
+CONNECTION
+pdr:Out:pdActor:In
+NumberOfControlPoints:0
+CONNECTION
+pdActor:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+Box04:DataPath:Box05:In1
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:pdr:In
+NumberOfControlPoints:0
+APP_END
index 36202210c18caf332e35504919a8c341d03717bd..06052099d578fde41e27306234121ef0d4f81c95 100644 (file)
@@ -1,49 +1,42 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_1.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
 
+include std
+include itkvtk
+include vtk
+include wxvtk
+include std
 
-description "LoadHola box example"
 author "Info-dev at creatis.insa-lyon.fr"
+description "LoadHola box example"
 category "example mesh"
 
-load vtk
-load wx
-load wxvtk
-load std
+new vtk:PolyDataReader pdr
+
+new vtk:PolyDataToActor pdActor
+
+new wxvtk:Viewer3D viewer
+
+new std:Configuration Box04
+
+new std:ConcatStrings Box05
+  set Box05.In2 "/vtk/bunny.vtk"
+
+
+connect pdr.Out pdActor.In
+
+connect pdActor.Out viewer.In1
 
-new FileSelector fileName
-  set fileName.Wildcard "*.vtk"
+connect Box04.DataPath Box05.In1
 
-new PolyDataReader pdr
-  connect fileName.Out pdr.In 
+connect Box05.Out pdr.In
 
-new PolyDataToActor pdActor
-  connect pdr.Out pdActor.In
 
-new  Viewer3D viewer
-  connect pdActor.Out viewer.In1  
 
+# Complex input ports
 exec viewer
diff --git a/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_2.bbg b/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_2.bbg
new file mode 100644 (file)
index 0000000..d28e355
--- /dev/null
@@ -0,0 +1,38 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_2.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example mesh
+DESCRIPTION:LoadBunny_vtkPolyData box example
+AUTHOR:Info-dev at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:3
+BOX
+vtk:LoadBunny_vtkPolyData:pdr
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+47.075000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:pdActor
+ISEXEC:FALSE
+-7.244640:41.412518:-900.000000
+37.280360:31.412518:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:TRUE
+0.000000:10.000000:-900.000000
+63.720000:0.000000:-900.000000
+FIN_BOX
+CONNECTIONS:2
+CONNECTION
+pdr:Out:pdActor:In
+NumberOfControlPoints:0
+CONNECTION
+pdActor:Out:viewer:In1
+NumberOfControlPoints:0
+APP_END
index 1601b7fd7a29cb97186dc604b1854338fac3e9bd..2f7d40edf9eae468ea0d64236f06878a90637bd7 100644 (file)
@@ -1,49 +1,32 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_2.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
 
+include std
+include itkvtk
+include vtk
+include wxvtk
 
-description "LoadBunny_vtkPolyData box example"
 author "Info-dev at creatis.insa-lyon.fr"
+description "LoadBunny_vtkPolyData box example"
 category "example mesh"
 
+new vtk:LoadBunny_vtkPolyData pdr
+
+new vtk:PolyDataToActor pdActor
+
+new wxvtk:Viewer3D viewer
 
-load wx
-load wxvtk
-load std
-include vtk
 
-//new PolyDataReader pdr
-//  set pdr.In "/Users/davila/Borrame/Images/Helena/bunny.vtk"
+connect pdr.Out pdActor.In
 
-new LoadBunny_vtkPolyData pdr
+connect pdActor.Out viewer.In1
 
-new PolyDataToActor pdActor
-  connect pdr.Out pdActor.In
 
-new  Viewer3D viewer
-  connect pdActor.Out viewer.In1  
 
+# Complex input ports
 exec viewer
diff --git a/packages/vtk/bbs/appli/exampleSave_vtkPolyData.bbg b/packages/vtk/bbs/appli/exampleSave_vtkPolyData.bbg
new file mode 100644 (file)
index 0000000..3895ebd
--- /dev/null
@@ -0,0 +1,94 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleSave_vtkPolyData.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example mesh
+DESCRIPTION:Save a vtkPolyData example
+AUTHOR:info-dev at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:8
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+-64.799460:68.621288:-900.000000
+-28.549460:58.621288:-900.000000
+FIN_BOX
+BOX
+vtk:MarchingCubes:mc
+ISEXEC:FALSE
+-48.298304:41.378712:-900.000000
+-9.148304:31.378712:-900.000000
+PORT
+Value:"1000"
+FIN_BOX
+BOX
+wx:FileSelector:saveFileName
+ISEXEC:FALSE
+9.650983:40.331662:-900.000000
+54.950983:30.331662:-900.000000
+PORT
+OpenSave:"Save"
+FIN_BOX
+BOX
+vtk:PolyDataWriter:pdw
+ISEXEC:FALSE
+-67.600270:-21.034034:-900.000000
+-28.700270:-31.034034:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:pdActor
+ISEXEC:FALSE
+11.029695:-8.293965:-900.000000
+55.554695:-18.293965:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-35.889896:-61.732067:-900.000000
+27.830104:-71.732067:-900.000000
+FIN_BOX
+BOX
+wx:CommandButton:button
+ISEXEC:FALSE
+-122.705360:20.288275:-900.000000
+-79.530360:10.288275:-900.000000
+PORT
+Label:"Save vtkPolyData"
+FIN_BOX
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+-52.779117:-102.430101:-900.000000
+-13.699117:-112.430101:-900.000000
+PORT
+Proportion:"90"
+FIN_BOX
+CONNECTIONS:8
+CONNECTION
+reader:Out:mc:In
+NumberOfControlPoints:0
+CONNECTION
+saveFileName:Out:pdw:Filename
+NumberOfControlPoints:0
+CONNECTION
+mc:Out:pdw:In
+NumberOfControlPoints:0
+CONNECTION
+mc:Out:pdActor:In
+NumberOfControlPoints:0
+CONNECTION
+pdActor:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+button:BoxChange:pdw:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+button:Widget:main:Widget2
+NumberOfControlPoints:0
+APP_END
index 61ff88f1622c65e276bef9cf11fa2db803b27bfe..b3b02116837b2d90f63922522966cbd3d25367dc 100644 (file)
@@ -1,68 +1,59 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleSave_vtkPolyData.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wx
+include wxvtk
 
-description "Save a vtkPolyData example"
 author "info-dev at creatis.insa-lyon.fr"
+description "Save a vtkPolyData example"
 category "example mesh"
 
-load wx
-load std
-load vtk
-load wxvtk
+new vtk:LoadHola reader
 
-include "vtk/boxes/bbLoadHola"
-new LoadHola reader
+new vtk:MarchingCubes mc
+  set mc.Value "1000"
 
-new MarchingCubes mc
-  set mc.Value 1000
-  connect reader.Out mc.In
+new wx:FileSelector saveFileName
+  set saveFileName.OpenSave "Save"
 
+new vtk:PolyDataWriter pdw
 
-new FileSelector saveFileName
-  set saveFileName.OpenSave Save
+new vtk:PolyDataToActor pdActor
 
-new PolyDataWriter pdw
-  connect saveFileName.Out pdw.Filename 
-  connect mc.Out pdw.In
+new wxvtk:Viewer3D viewer
 
-new PolyDataToActor pdActor
-  connect mc.Out pdActor.In
+new wx:CommandButton button
+  set button.Label "Save vtkPolyData"
 
-new  Viewer3D viewer
-  connect pdActor.Out viewer.In1  
+new wx:LayoutSplit main
+  set main.Proportion "90"
 
-new CommandButton button
-  set button.Label "Save vtkPolyData"
-  connect button.BoxChange pdw.BoxExecute
 
-new LayoutSplit main
-  set main.Proportion 90
-  connect viewer.Widget main.Widget1
-  connect button.Widget main.Widget2
+connect reader.Out mc.In
 
-exec main
+connect saveFileName.Out pdw.Filename
+
+connect mc.Out pdw.In
 
+connect mc.Out pdActor.In
 
+connect pdActor.Out viewer.In1
+
+connect button.BoxChange pdw.BoxExecute
+
+connect viewer.Widget main.Widget1
+
+connect button.Widget main.Widget2
+
+
+
+# Complex input ports
+exec main
diff --git a/packages/vtk/bbs/boxes/bbLoadHola_vtkPolyData.bbs b/packages/vtk/bbs/boxes/bbLoadHola_vtkPolyData.bbs
deleted file mode 100644 (file)
index 4bf24da..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
-
-
-load vtk
-include std/boxes/bbPrependPackageDataPath
-
-define LoadHola_vtkPolyData vtk
-  description "Loads the image 'hola_vtkPolyData.vtk'" 
-  author "eduardo.davila at creatis.insa-lyon.fr"
-  category "mesh;read/write"
-
-  new PolyDataReader reader
-  new PrependPackageDataPath ppdp
-  set ppdp.In "hola_vtkPolyData.vtk"
-  set ppdp.Package "vtk"
-  connect ppdp.Out reader.In
-  output Out reader.Out "The poly data"
-  output FileName ppdp.Out "The path to the mesh to load"
-
-endefine
diff --git a/packages/vtk/data/testImage.mhd b/packages/vtk/data/testImage.mhd
deleted file mode 100644 (file)
index e624826..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-ObjectType = Image
-NDims = 3
-DimSize = 127 147 187
-ElementType = MET_USHORT
-HeaderSize = 0
-ElementNumberOfChannels = 1
-
-ElementSpacing = 0.7 0.7 0.7
-Position = 0 0 0
-TransformMatrix = 1 0 0 0 1 0 0 0 1
-Offset = 0 0 0
-CenterOfRotation = 0 0 0
-
-BinaryData = True
-BinaryDataByteOrderMSB = False
-CompressedData = False
-
-ElementDataFile = hola.raw
index 067af425a2743d138bdd84c447aa921d08c5b9b9..f0b0372b60487c58ef9d7d73fe3b005b9ff072df 100755 (executable)
@@ -68,11 +68,20 @@ public:
                //Se pregunta al OS el tamanio de la palabra de un apuntador
                int palabra = sizeof(T);
                db = vtkImageData::New();
-               db->SetScalarType(Memcache::darTipo(palabra));
                db->SetDimensions(x,y,z);
                db->SetOrigin(0, 0, 0);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+               db->SetScalarType(Memcache::darTipo(palabra));
                db->AllocateScalars();
                db->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               db->AllocateScalars(Memcache::darTipo(palabra),1);
+#endif
+
+
        }
        void* get(int x, int y, int z)
        {
index cb8dd8635ed594e5b1eea9cdeea5e90c1d04a0e4..9dde44cee4ec895e87a932f25e0f2b14bb73a4ad 100644 (file)
 
 <process>
 <PRE>
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   bbGetVtkObject()->SetInput(bbGetInputIn1());
   bbGetVtkObject()->SetInput(bbGetInputIn2());
   bbGetVtkObject()->SetInput(bbGetInputIn3());
   bbGetVtkObject()->SetInput(bbGetInputIn4());
   bbGetVtkObject()->SetInput(bbGetInputIn5());
+#else
+  bbGetVtkObject()->AddInputData(bbGetInputIn1());
+  bbGetVtkObject()->AddInputData(bbGetInputIn2());
+  bbGetVtkObject()->AddInputData(bbGetInputIn3());
+  bbGetVtkObject()->AddInputData(bbGetInputIn4());
+  bbGetVtkObject()->AddInputData(bbGetInputIn5());
+#endif
+
    
   bbGetVtkObject()->Update();
 </PRE>
index 00635e9c4db318a9be60f7af24b44f693e53b223..703366e55fe5068ac6b6e023bc5f1b2033a2f4d6 100644 (file)
@@ -57,30 +57,41 @@ void AutoCrop::Process()
        int i,j,k;
        int sizeX,sizeY,sizeZ;
 
-       if (bbGetInputIn()!=NULL){
-               bbGetInputIn()->Update();
+       if (bbGetInputIn()!=NULL)
+       {
                int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+               bbGetInputIn()->Update();
                bbGetInputIn()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               bbGetInputIn()->GetExtent(ext);
+#endif
+
                sizeX=ext[1]-ext[0]+1;
                sizeY=ext[3]-ext[2]+1;
-               sizeZ=ext[5]-ext[4]+1;
-               
+               sizeZ=ext[5]-ext[4]+1;          
                sizeX=(sizeX/2)*2;
                sizeY=(sizeY/2)*2;
-//             if (_newImage==NULL)
-//             {
-                       _newImage = vtkImageData::New();
-                       _newImage->Initialize();
-                       _newImage->SetScalarType( bbGetInputIn()->GetScalarType() );
-                       _newImage->SetSpacing( bbGetInputIn()->GetSpacing() );
-                       _newImage->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() );
-                       _newImage->SetDimensions(  sizeX,sizeY,sizeZ );
-                   _newImage->SetWholeExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
-                       _newImage->AllocateScalars();
-//             }
-       
-
-               
+               _newImage = vtkImageData::New();
+               _newImage->Initialize();
+               _newImage->SetSpacing( bbGetInputIn()->GetSpacing() );
+               _newImage->SetDimensions(  sizeX,sizeY,sizeZ );
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+               _newImage->SetWholeExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
+               _newImage->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() );
+               _newImage->SetScalarType( bbGetInputIn()->GetScalarType() );
+               _newImage->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               _newImage->SetExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
+               _newImage->AllocateScalars(bbGetInputIn()->GetScalarType(),1);
+#endif
                for (i=0; i<sizeX; i++) 
                {
                         for (j=0; j<sizeY; j++)
@@ -91,12 +102,9 @@ void AutoCrop::Process()
                                        _newImage->SetScalarComponentFromDouble(i,j,k, 0, value );
                                } // for k
                        } // for j
-               } // for i
-                        
-       }// bbGetInputIn
-                        
+               } // for i                      
+       }// bbGetInputIn                         
    bbSetOutputOut(_newImage);
-               
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
index 1af72e3c08fa77ab08893e144e5a0646449fca2d..12f80efdcec8083a9d5456b792576eda25424eb2 100644 (file)
@@ -62,10 +62,10 @@ class bbvtk_EXPORT AutoCrop
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(AutoCrop,bbtk::AtomicBlackBox);
        BBTK_NAME("AutoCrop");
        BBTK_AUTHOR("Info-Dev");
-       BBTK_DESCRIPTION("Automatique cropping of the image");
+       BBTK_DESCRIPTION("Automatique cropping of the image, (See also ImageBoundaries)");
        BBTK_CATEGORY("Filter");
        BBTK_INPUT(AutoCrop,In,"Input image",vtkImageData*,"");
-       BBTK_INPUT(AutoCrop,Type,"Type of cropping   (default 0)  0=power of two dimensions",int,"");
+       BBTK_INPUT(AutoCrop,Type,"Type of cropping   (default 0)  0=power of two dimensions X and Y",int,"");
        BBTK_OUTPUT(AutoCrop,Out,"Output image",vtkImageData*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(AutoCrop);
 //===== 
index f58c6ecd642af8bb16c110e4717fcb350b54d98a..106ceb27eb8c33530d01012d2f4e9c746fa2c363 100644 (file)
@@ -54,15 +54,25 @@ void BinaryOperations::Process()
                return;
        }
 
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        ope->SetInput1((vtkDataObject*)bbGetInputIn1());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       ope->SetInput1Data((vtkDataObject*)bbGetInputIn1());
+#endif
 
        if (bbGetInputIn2() != NULL)
        {
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                ope->SetInput2((vtkDataObject*)bbGetInputIn2());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               ope->SetInput2Data((vtkDataObject*)bbGetInputIn2());
+#endif
 
-       }
-       else
-       {
+       } else {
            std::cout << "Set In2" << std::endl;
         return;
        }
index 6db94bb551ef20b5a29c65a184556565d6c1b137..e7db21ea400e158b50d43b562d8c3ecdc3e6865c 100755 (executable)
@@ -121,7 +121,6 @@ vtkImageData* CSVReader::createImage(std::vector< std::vector<double> > info, in
        //original->GetOrigin(origin);
        //original->GetDimensions(newDim);
 
-       final->SetScalarType(scalar_type);
 
        //final->SetSpacing(space);
        newDim[0] = x;
@@ -133,8 +132,17 @@ vtkImageData* CSVReader::createImage(std::vector< std::vector<double> > info, in
        origin[2] = 0;
        final->SetOrigin(origin);
 
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+       final->SetScalarType(scalar_type);
        final->AllocateScalars();
        final->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       final->AllocateScalars(scalar_type,1);
+#endif
+
 
        for (int i=0; i<newDim[0]; i++){
                for (int j=0; j<newDim[1]; j++){
index 618f2b0eace65dc9d16e913cdda2f6ecde7c0f1c..80caf30829cf4c1e742028bb48cf54ee7f9ddb0d 100644 (file)
@@ -44,7 +44,14 @@ void CleanExternalPlane::CleanTypeA(vtkImageData* image)
                int i,j;
                int ext[6];
                int dim[3];
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                image->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               image->GetExtent(ext);
+#endif
                
                dim[0]=ext[1]-ext[0]+1;
                dim[1]=ext[3]-ext[2]+1;
@@ -85,11 +92,17 @@ void CleanExternalPlane::CleanTypeA(vtkImageData* image)
 //----------------------------------------------------------------------
 void CleanExternalPlane::CleanTypeB()
 {
-
        int             ext[6]; 
        int             dimA[3];        
        int             dimB[3];        
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        bbGetInputIn()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       bbGetInputIn()->GetExtent(ext);
+#endif
 
        dimA[0] =       ext[1]-ext[0]+1;
        dimA[1] =       ext[3]-ext[2]+1;
@@ -101,10 +114,17 @@ void CleanExternalPlane::CleanTypeB()
 
        
        imageoutput->Initialize();
-       imageoutput->SetScalarType( bbGetInputIn()->GetScalarType() );  
        imageoutput->SetSpacing( bbGetInputIn()->GetSpacing() );
        imageoutput->SetDimensions(  dimB[0], dimB[1], dimB[2] );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+       imageoutput->SetScalarType( bbGetInputIn()->GetScalarType() );  
        imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       imageoutput->AllocateScalars( bbGetInputIn()->GetScalarType() , 1);
+#endif
        
 
        int j,k;
@@ -115,9 +135,18 @@ void CleanExternalPlane::CleanTypeB()
                for (k=0;k<dimA[2];k++)
                {
                        memcpy(   imageoutput->GetScalarPointer(1,j+1,k+1) , bbGetInputIn()->GetScalarPointer(0,j,k) , sizeBlock );
-               }
-       }
+               } // for k
+       } // for j
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        imageoutput->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       // ..
+#endif
+
        imageoutput->Modified();
 }
 
index 1367ec761bf1ad6fa23e6274539ac27d1cfde41c..cac0843f01cb91aa90a33871e55978adfb3ec9fc 100644 (file)
@@ -89,17 +89,17 @@ namespace bbvtk
  ///  - supposes *all* the images are consistent (same type, same number of components, same pixel type)
  ///  - if images in the vector are already 3D, exports only the first one. ?!?  // JPR
  ///
-   void ConcatImages::Process()
-   {
-        int dim[3];
-        int curDim[3];
+void ConcatImages::Process()
+{
+       int dim[3];
+       int curDim[3];
        int nbComponents;
        int scalarType;
        int nb = (unsigned int)bbGetInputIn().size();
 //     int consistentNb(nb);
        int newSizeZ;
 
-        if (nb == 0) {
+    if (nb == 0) {
           // ??? JPR
        } 
        
@@ -111,40 +111,36 @@ namespace bbvtk
           mConcat = bbGetInputIn()[0];
           //mConcat->PrintSelf(std::cout, vtkIndent(2));
        } else {
-          // We suppose *all* the images within the directory are consistent (same sizeS, same pixel Type?...)
-          vtkImageData * firstImage = bbGetInputIn()[0];
+               // We suppose *all* the images within the directory are consistent (same sizeS, same pixel Type?...)
+               vtkImageData * firstImage = bbGetInputIn()[0];
           
-                 //std::cout << "--------PrintSelf firstImage " << std::endl;
-                 // firstImage->PrintSelf(std::cout, vtkIndent(2));       
+               //std::cout << "--------PrintSelf firstImage " << std::endl;
+               // firstImage->PrintSelf(std::cout, vtkIndent(2));         
           
-           nbComponents = firstImage->GetNumberOfScalarComponents();
-           mConcat->SetNumberOfScalarComponents(nbComponents);
-          
-          mConcat->SetScalarType(firstImage->GetScalarType( ));
-          scalarType = firstImage->GetScalarType( );
-          mConcat->SetScalarType(scalarType);
+               nbComponents = firstImage->GetNumberOfScalarComponents();
+               scalarType = firstImage->GetScalarType( );
           
-          mConcat->SetSpacing(firstImage->GetSpacing());
+               mConcat->SetSpacing(firstImage->GetSpacing());
           
-          firstImage->GetDimensions(dim);
-          newSizeZ=0;
-          // brute way to perform an ultra-mini consistency check :
-          // First image is supposed to be the reference image,
-          // any unconsistent image is just discarted...
-          for(int i=0; i<nb; i++)
-          {
+               firstImage->GetDimensions(dim);
+               newSizeZ=0;
+               // brute way to perform an ultra-mini consistency check :
+               // First image is supposed to be the reference image,
+               // any unconsistent image is just discarted...
+               for(int i=0; i<nb; i++)
+               {
 
 //EED 2013 oct 29 
 //EED        if ( !CheckConsistency(firstImage, dim, nbComponents, scalarType))
 //EED          consistentNb--;
 
              if ( CheckConsistency(bbGetInputIn()[i], dim, nbComponents, scalarType))
-               {
-                       bbGetInputIn()[i]->GetDimensions(curDim);
-                       newSizeZ = newSizeZ + curDim[2];
-               } // if
+                       {
+                               bbGetInputIn()[i]->GetDimensions(curDim);
+                               newSizeZ = newSizeZ + curDim[2];
+                       } // if
                
-          }    // for
+               }    // for
 
           dim[2]=newSizeZ;
 
@@ -152,8 +148,17 @@ namespace bbvtk
           mConcat->SetDimensions(dim);
           mConcat->SetExtent(0, dim[0]-1, 0, dim[1]-1, 0, dim[2]-1);
                   
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+       mConcat->SetNumberOfScalarComponents(nbComponents);
+          mConcat->SetScalarType(scalarType);
           mConcat->AllocateScalars();
           mConcat->Update();      
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+          mConcat->AllocateScalars(scalarType,nbComponents);
+#endif
                     
           int index_image;
 
@@ -195,8 +200,9 @@ namespace bbvtk
 
    // Devrait etre dans bbUserFinalizeProcessing() ? On n'y entre jamais // JPR        
    bbSetOutputOut(mConcat);    
-   }              
+}                 
 
+//---------------------------------------------------
 bool ConcatImages::CheckConsistency( vtkImageData *curImage, int dim[], int nbComponents, int scalarType )
 {
    assert (curImage);
index 84cc3d1767f160a8e6fc278c3d45dbbd1a48e855..c789e172c87083486e33867d513a29a5ff40d7f8 100644 (file)
 <vtkobject>vtkConeSource</vtkobject>
 
 <output name="Out"       type="vtkPolyData*" special="vtk output"    description="Output Cone"/>
-<input name="Radius"     type="double"       special="vtk parameter" description="Cone Radius"/>
-<input name="Resolution" type="int"          special="vtk parameter" description="Cone Resolution"/>
-<input name="CenterX"    type="double" description="Center X coord"/>
-<input name="CenterY"    type="double" description="Center Y coord"/>
-<input name="CenterZ"    type="double" description="Center Z coord"/>
-<input name="DirectionX" type="double" description="X Direction"/>
-<input name="DirectionY" type="double" description="Y Direction"/>
-<input name="DirectionZ" type="double" description="Z Direction"/>
+<input name="Radius"     type="double"       special="vtk parameter" description="Cone Radius (default 1)"/>
+<input name="Height"     type="double"       special="vtk parameter" description="Cone height (default 1)"/>
+<input name="Resolution" type="int"          special="vtk parameter" description="Cone Resolution (default 10)"/>
+<input name="CenterX"    type="double" description="Center X coord (default 0)"/>
+<input name="CenterY"    type="double" description="Center Y coord (default 0)"/>
+<input name="CenterZ"    type="double" description="Center Z coord (default 0)"/>
+<input name="DirectionX" type="double" description="X Direction (default 0)"/>
+<input name="DirectionY" type="double" description="Y Direction (default 0)"/>
+<input name="DirectionZ" type="double" description="Z Direction (default 1)"/>
 
 <process>
 <PRE>
 bbGetVtkObject()->SetCenter(bbGetInputCenterX(), 
                            bbGetInputCenterY(), 
                            bbGetInputCenterZ());
-
 bbGetVtkObject()->SetDirection(bbGetInputDirectionX(), 
                                bbGetInputDirectionY(),
-                               bbGetInputDirectionZ());
-                    
+                               bbGetInputDirectionZ());                    
 bbGetVtkObject()->SetResolution(bbGetInputResolution());
 bbGetVtkObject()->SetRadius((double)bbGetInputRadius());
+bbGetVtkObject()->SetHeight((double)bbGetInputHeight());
 bbGetVtkObject()->Update();
 </PRE>
 </process>
 
+<defaultValues>
+<PRE>
+  bbSetInputRadius( 1 );
+  bbSetInputHeight( 1 );
+  bbSetInputResolution( 10 );
+  bbSetInputCenterX( 0 );
+  bbSetInputCenterY( 0 );
+  bbSetInputCenterZ( 0 );
+  bbSetInputDirectionX( 0 );
+  bbSetInputDirectionY( 0 );
+  bbSetInputDirectionZ( 1 );
+</PRE>
+</defaultValues>   
+
+
+
 
 </blackbox>
 
index c5f71b5fa96406085fd4901905d020c7d9025e90..007c34718cc779e17897a44f3ddd81ec35f4dddc 100644 (file)
@@ -56,6 +56,7 @@ void CreateImage::Process()
        double  spc[3];
        int             dim[3]; 
        int             outputformat = VTK_UNSIGNED_SHORT;
+       
        if (bbGetInputOutputFormat()=="VTK_BIT")                                        outputformat = VTK_BIT;                 // 1
        else if (bbGetInputOutputFormat()=="VTK_CHAR")                          outputformat = VTK_CHAR;                                // 2
        else if (bbGetInputOutputFormat()=="MET_CHAR")                          outputformat = VTK_CHAR;                                // 2
@@ -78,6 +79,7 @@ void CreateImage::Process()
        else if (bbGetInputOutputFormat()=="MET_FLOAT")                         outputformat = VTK_FLOAT;               // 10
        else if (bbGetInputOutputFormat()=="VTK_DOUBLE")                        outputformat = VTK_DOUBLE;              // 11           
        else if (bbGetInputOutputFormat()=="MET_DOUBLE")                        outputformat = VTK_DOUBLE;              // 11  
+
        spc[0] = bbGetInputSpacing()[0];
        spc[1] = bbGetInputSpacing()[1];
        spc[2] = bbGetInputSpacing()[2];
@@ -103,27 +105,47 @@ void CreateImage::Process()
        }       
        imageoutput = vtkImageData::New();
        imageoutput->Initialize();
-       imageoutput->SetScalarType( outputformat );     
        imageoutput->SetSpacing( spc );
        imageoutput->SetDimensions(  dim[0], dim[1], dim[2] );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+       imageoutput->SetScalarType( outputformat );     
        imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       imageoutput->AllocateScalars( outputformat,1 );
+#endif
+       
        int i,j,k;
        long sizeBlock; 
+
        for (i=0; i<dim[0]; i++)
        {
                imageoutput->SetScalarComponentFromDouble(i,0,0, 0, bbGetInputInitialValue() );
-       }       
+       } // for i
+       
        sizeBlock= dim[0] * imageoutput->GetScalarSize();
-            for (j=1; j<dim[1]; j++)
+    for (j=1; j<dim[1]; j++)
        {
                memcpy(  imageoutput->GetScalarPointer(0,j,0), imageoutput->GetScalarPointer()  , sizeBlock );
-       }               
+       } // for j              
+
        sizeBlock= dim[0] * dim[1] * imageoutput->GetScalarSize();
        for (k=0; k<dim[2]; k++)
        {
                memcpy(  imageoutput->GetScalarPointer(0,0,k) ,imageoutput->GetScalarPointer()  , sizeBlock );
        } // for k
+       
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        imageoutput->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       // ..
+#endif
+
        imageoutput->Modified();
        bbSetOutputOut(imageoutput);
 }      
index efbbe227e7eb91a17ed86c540eda84e5d8d409dc..21934235fe84b9e2126d4c9dfa11f49160fcd170 100644 (file)
@@ -49,7 +49,14 @@ void ExtractVtkImageFilter::Process()
        voi[4] = bbGetInputIndex()[2];
        voi[5] = bbGetInputIndex()[2]+bbGetInputSize()[2]-1;
        
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        _extract->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       _extract->SetInputData( bbGetInputIn() );
+#endif
+
        _extract->SetVOI(voi);  
        _extract->UpdateWholeExtent();
        _extract->Modified();
index a252888c5a04d9bffdaddef6a76f19e3dab1f7b8..8ec173cf705ed77ca42c8608d625389b9cb9db6e 100644 (file)
@@ -100,16 +100,31 @@ void Flip::Process()
        
                mImageOut = vtkImageData::New();  // Alloc depends on  bbGetInputIn().size()  
                mImageOut->Initialize();
-               mImageOut->SetScalarType(  bbGetInputIn()->GetScalarType() );
                mImageOut->SetSpacing(   bbGetInputIn()->GetSpacing()  );
                mImageOut->SetDimensions(   bbGetInputIn()->GetDimensions()  );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+               mImageOut->SetScalarType(  bbGetInputIn()->GetScalarType() );
                mImageOut->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() );
                mImageOut->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               mImageOut->AllocateScalars(bbGetInputIn()->GetScalarType() , bbGetInputIn()->GetNumberOfScalarComponents());
+#endif
        
                int inputdims[3];
                //   int outputdims[3];
                bbGetInputIn()->GetDimensions (inputdims);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                bbGetInputIn()->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               // ..
+#endif
+
                int nbScalComp  = bbGetInputIn()->GetNumberOfScalarComponents();
                int scalarSize  = bbGetInputIn()->GetScalarSize();
                int lineSize    = inputdims[0]*scalarSize*nbScalComp;      
index fb9eb2464504f5fd473f5a21534fea7956cd50d1..8d003bdca2e01f1634bf17bc93060f1c0e0ebf89 100644 (file)
@@ -43,10 +43,20 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageBoundaries,bbtk::AtomicBlackBox);
 //===== 
 void ImageBoundaries::Process()
 {
-       if (bbGetInputIn()!=NULL)
-       {
-               int ext[6];             
+       printf("bbtk:vtk::ImageBoundaries::Process start\n");
+       if (bbGetInputIn()!=NULL){
+               int i,j,k;      
+               int ext[6];
+               double value;
+               
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                bbGetInputIn()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               bbGetInputIn()->GetExtent(ext);
+#endif
+
                int maxX        = ext[1]-ext[0]+1;
                int maxY        = ext[3]-ext[2]+1;
                int maxZ        = ext[5]-ext[4]+1;
index 6543e0620e721bbb2e5a3ada7b9177460b4d4b04..b27dbb6c5f2a789d13a433962bc033b7c742e17e 100644 (file)
@@ -48,7 +48,15 @@ void ImageCastToUShort::Process()
 //      (the one provided in the attribute 'type' of the tag 'input') 
 
        vtkImageData* img = bbGetInputIn();     
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        cast->SetInput(img);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       cast->SetInputData(img);
+#endif
+
        cast->SetOutputScalarTypeToUnsignedShort();
        cast->Modified();
        cast->Update();
index d3cd9d4040fca938bd84fa6ed9446927fb706c20..9f6bc7d20c36e4fce83d2c320fcfe4eaca8c1fdb 100644 (file)
@@ -207,24 +207,56 @@ namespace bbvtk
           // EED MPR view orientation correction..
      vtkImageFlip  *flipYFilter = vtkImageFlip::New();
      flipYFilter->SetFilteredAxis(1); // flip y axis
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
      flipYFilter->SetInput( planeWidgetX->GetResliceOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+     flipYFilter->SetInputData( planeWidgetX->GetResliceOutput() );
+#endif
+
      flipYFilter->Update();
 
           vtkImageChangeInformation *image = vtkImageChangeInformation::New();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
           image->SetInput(  planeWidgetY->GetResliceOutput()  );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+          image->SetInputData(  planeWidgetY->GetResliceOutput()  );
+#endif
+
           image->SetOutputSpacing( 1,1,1 );       
           image->CenterImageOn();
           image->Update();
           _imageTransform = vtkTransform::New();
           vtkImageReslice *slicer =vtkImageReslice::New();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
           slicer->SetInput( image->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+          slicer->SetInputData( image->GetOutput() );
+#endif
+
           slicer->SetInformationInput( image->GetOutput() );
           slicer->SetResliceTransform( _imageTransform );
           slicer->SetOutputOrigin(0 , 0 , 0 );
           slicer->SetInterpolationModeToNearestNeighbor();
           slicer->Update();       
           vtkImageChangeInformation *imageResult = vtkImageChangeInformation::New();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
           imageResult->SetInput( slicer->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+          imageResult->SetInputData( slicer->GetOutput() );
+#endif
+
           double spc[3];
            planeWidgetY->GetResliceOutput()->GetSpacing(spc);
           imageResult->SetOutputSpacing( spc[1], spc[0], spc[2] ); 
@@ -286,7 +318,14 @@ namespace bbvtk
        {
                int dim[3];
                int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                bbGetOutputPlaneX()->GetResliceOutput()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               bbGetOutputPlaneX()->GetResliceOutput()->GetExtent(ext);
+#endif
+
                dim[0] = ext[1]-ext[0]+1;
                dim[1] = ext[3]-ext[2]+1;
                dim[2] = ext[5]-ext[4]+1;
@@ -306,7 +345,14 @@ namespace bbvtk
                        double xSpacing, ySpacing, zSpacing;
                        bbGetInputIn()->GetSpacing(xSpacing, ySpacing, zSpacing);
 
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                        bbGetOutputPlaneX()->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+                       bbGetOutputPlaneX()->SetInputData(bbGetInputIn());
+#endif
+
                        bbGetOutputPlaneX()->SetPlaneOrientationToXAxes();       
                        bbGetOutputPlaneX()->SetSlicePosition((xMax+xMin)/2.*xSpacing);
 
@@ -314,11 +360,25 @@ namespace bbvtk
                        //                 bbGetOutputPlaneX()->SetPoint1( 0*xSpacing, 146*ySpacing, 186*zSpacing);
                        //                 bbGetOutputPlaneX()->SetPoint2( 126*xSpacing, 146*ySpacing, 0*zSpacing);
 
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                        bbGetOutputPlaneY()->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+                       bbGetOutputPlaneY()->SetInputData(bbGetInputIn());
+#endif
+
                        bbGetOutputPlaneY()->SetPlaneOrientationToYAxes();
                        bbGetOutputPlaneY()->SetSlicePosition((yMax+yMin)/2.*ySpacing);
 
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                        bbGetOutputPlaneZ()->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+                       bbGetOutputPlaneZ()->SetInputData(bbGetInputIn());
+#endif
+
                        bbGetOutputPlaneZ()->SetPlaneOrientationToZAxes();
                        bbGetOutputPlaneZ()->SetSlicePosition((zMax+zMin)/2.*zSpacing);
 
@@ -349,9 +409,15 @@ namespace bbvtk
                bbGetOutputPlaneZ()->SetResliceInterpolate( bbGetInputInterpolation() );
 
                
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                bbGetOutputPlaneX()->GetResliceOutput()->Update();
                bbGetOutputPlaneY()->GetResliceOutput()->Update(); 
                bbGetOutputPlaneZ()->GetResliceOutput()->Update();               
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               // ...
+#endif
                
                std::vector<int> pointsx = bbGetInputPointsX();
                std::vector<int> pointsy = bbGetInputPointsY();
@@ -392,7 +458,15 @@ namespace bbvtk
 
        //for the plane widgets
                        vtkImagePlaneWidget* plane3pts = (vtkImagePlaneWidget*)bbGetOutputPlane3Pts();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                        plane3pts->SetInput(bbGetInputIn());                    
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+                       plane3pts->SetInputData(bbGetInputIn());                        
+#endif
+
                        double xSpacing, ySpacing, zSpacing;
                        bbGetInputIn()->GetSpacing(xSpacing, ySpacing, zSpacing);
                        plane3pts->SetOrigin(pointsx[0]*xSpacing,pointsy[0]*ySpacing,pointsz[0]*zSpacing);      
@@ -402,7 +476,15 @@ namespace bbvtk
                        plane3pts->SetPoint2((origin[0]+vect2[0]*factor)*xSpacing,
                                                                        (origin[1]+vect2[1]*factor)*ySpacing,
                                                                        (origin[2]+vect2[2]*factor)*zSpacing);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                        plane3pts->GetResliceOutput()->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+                       // ..
+#endif
+
 //To get the slice of image out of the selected volume
                        if (_imageReslicer==NULL)
                        {
@@ -412,15 +494,34 @@ namespace bbvtk
                                _matrix = vtkMatrix4x4::New();  
                        } // if
                        _imageReslicer->SetInterpolationMode( bbGetInputInterpolation() );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                        _imageReslicer->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+                       _imageReslicer->SetInputData( bbGetInputIn() );
+#endif
+
+
                        _imageReslicer->SetInformationInput(bbGetInputIn());    
                        //fill out the information with the created vectors and using the spacing of the image
                        _imageReslicer->SetResliceAxesDirectionCosines(newx[0]*xSpacing,newx[1]*xSpacing,newx[2]*xSpacing,
                                                                        vect2[0]*ySpacing,vect2[1]*ySpacing,vect2[2]*ySpacing,
                                                                        crossp[0]*zSpacing,crossp[1]*zSpacing,crossp[2]*zSpacing);                      
                        _imageReslicer->SetResliceAxesOrigin(origin[0]*xSpacing,origin[1]*ySpacing,origin[2]*zSpacing);
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                        _imageReslicer->GetOutput()->Update();
                        _imageReslicer->GetOutput()->UpdateInformation();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+                       _imageReslicer->Update();
+#endif
+
+
 
                        bbSetOutputImage3Pts(_imageReslicer->GetOutput());
 
index 2057727a9a88ada2d54699fd003f226efafa8840..a065023d1f2d8d09bd310d200bea42574d90890f 100644 (file)
@@ -55,8 +55,15 @@ void ImageVtkProperties::Process()
        if ( bbGetInputIn() )
        {
                bbGetInputIn()->Modified();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
                bbGetInputIn()->Update();
                bbGetInputIn()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               bbGetInputIn()->GetExtent(ext);
+#endif
+
                vsize.push_back(ext[1]-ext[0]+1);
                vsize.push_back(ext[3]-ext[2]+1);
                vsize.push_back(ext[5]-ext[4]+1);
index 75d4e53e57574644639ce0b071309679adda11a4..29be94cabe1ed7bd18a5b9e3f2b6b89130773987 100644 (file)
@@ -36,12 +36,82 @@ void InversCrop::Process()
                int dim[3];
                int ext[6];
        
-               bbGetInputImageFix()->GetWholeExtent(ext);
-               dim[0]= ext[1]-ext[0]+1;
-               dim[1]= ext[3]-ext[2]+1;
-               dim[2]= ext[5]-ext[4]+1;
-
-               if (bbGetInputType()==0)
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+       bbGetInputImageFix()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       bbGetInputImageFix()->GetExtent(ext);
+#endif
+       dim[0]= ext[1]-ext[0]+1;
+       dim[1]= ext[3]-ext[2]+1;
+       dim[2]= ext[5]-ext[4]+1;
+
+       if (bbGetInputType()==0)
+       {
+               _imageoutput = vtkImageData::New();
+               _imageoutput->Initialize();
+               _imageoutput->SetSpacing( bbGetInputImageFix()->GetSpacing() );
+               _imageoutput->SetDimensions(  dim[0], dim[1], dim[2] );
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+               _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
+               _imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               _imageoutput->AllocateScalars(bbGetInputImageFix()->GetScalarType() , 1);
+#endif
+       }
+       if (bbGetInputType()==1)
+       {
+               _imageoutput=bbGetInputImageFix();
+       }
+
+
+        // Duplicating Fix Image
+       long sizeimage = dim[0]*dim[1]*dim[2]*bbGetInputImageFix()->GetScalarSize();    
+       memcpy( _imageoutput->GetScalarPointer() , bbGetInputImageFix()->GetScalarPointer() , sizeimage);
+
+       // Copy the Move Image
+       int j,k; 
+       int px,py,pz;
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+       bbGetInputImageMove()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       bbGetInputImageMove()->GetExtent(ext);
+#endif
+
+       int dimMoveX = ext[1]-ext[0]+1;
+       int dimMoveY = ext[3]-ext[2]+1;
+       int dimMoveZ = ext[5]-ext[4]+1;
+
+        int spxM=0;  // start px MoveImage
+        int sizeXM=0;  // sizeX MoveImage
+
+       px=bbGetInputOrigin()[0];
+        spxM=0;
+        if (px<=0)
+       { 
+          spxM=px*(-1);
+          px=0;
+       }
+       sizeXM = dimMoveX-spxM;
+       if (px+sizeXM>=dim[0]) sizeXM=dim[0]-px;
+
+       sizeXM=sizeXM*bbGetInputImageFix()->GetScalarSize();
+       for (k=0; k<dimMoveZ; k++)
+       {
+          for (j=0; j<dimMoveY; j++)
+          {
+                py=j+bbGetInputOrigin()[1];
+               pz=k+bbGetInputOrigin()[2];
+               
+               if ( (py<dim[1]) && (pz<dim[2]) &&
+                    (py>=0)    && (pz>=0)      &&
+                    (sizeXM>0) ) 
                {
                        _imageoutput = vtkImageData::New();
                        _imageoutput->Initialize();
index c1bf38d3f63b646b805dc302288c95191ac7ac9f..9da0c3efe4c389d34a471288a61fea67b953dc42 100644 (file)
@@ -54,9 +54,6 @@ namespace bbvtk
        //---------------------------------------------------------------------
    void MIPCreator::bbUserSetDefaultValues()
    {
-
-
-
        std::vector<double> opaValues;
        std::vector<double> denPoints;
        opaValues.push_back(0.0);
@@ -65,28 +62,28 @@ namespace bbvtk
        bbSetInputOpacityValues(opaValues);
        bbSetInputMinColorWindow(0.0);
        bbSetInputMaxColorWindow(255.0);
-
-       opacityTransferFunction = vtkPiecewiseFunction::New();
-       grayTransferFunction = vtkPiecewiseFunction::New();
-
+       opacityTransferFunction         = vtkPiecewiseFunction::New();
+       grayTransferFunction    = vtkPiecewiseFunction::New();
           mCast        = NULL;
+
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7) 
           mMIP         = NULL;
+#else 
+       //
+#endif
+
           mMapper      = NULL;
           mVolume      = NULL;
-
-
    }
+
        //---------------------------------------------------------------------
    void MIPCreator::bbUserInitializeProcessing()
    {
-
-
     // Create the pipeline
     mCast = vtkImageShiftScale::New();
     mCast->SetOutputScalarTypeToUnsignedChar();
     mCast->ClampOverflowOn();
-
-
 }
 
 //---------------------------------------------------------------------
@@ -98,11 +95,16 @@ namespace bbvtk
                   mCast=NULL;
           }
 
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7) 
           if (mMIP!=NULL)
           {
                   mMIP->Delete();
                   mMIP=NULL;
           }
+#else 
+       //
+#endif
 
           if (mMapper!=NULL)
           {
@@ -120,62 +122,46 @@ namespace bbvtk
 
    void MIPCreator::Process()
    {
-
-
-
         double ranges[2];
         vtkImageData *image =  bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
         image->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       // ..
+#endif
         image->GetScalarRange(ranges);
-
           scale = 255/(ranges[1]/100);
-
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        mCast->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       mCast->SetInputData( bbGetInputIn() );
+#endif
        mCast->SetScale( scale / 100.0 );
      //mCast->SetShift( -bbGetInputShift() );
-
-
-
-
-
-
-
-
-
      DensityPoints = bbGetInputDensityPoints();
-
      //We assign by default the values of density by regarding at range from the image
      if(DensityPoints.size()==0)
      {
             DensityPoints.push_back(ranges[0]);
             DensityPoints.push_back(ranges[1]);
      }
-
-
      OpacityValues = bbGetInputOpacityValues();
-
      while(DensityPoints.size()>OpacityValues.size())
      {
          OpacityValues.push_back(1.0);
      }
-
-
-
       double factor = scale/ 100.0 ;
-
        double minCF = bbGetInputMinColorWindow();
        double maxCF = bbGetInputMaxColorWindow();
-
        grayTransferFunction->AddSegment( minCF , 0.0 , maxCF , 1.0 );
-
-
-
-
         for(int i =0; i< DensityPoints.size(); i++)
         {
-         cout<<"MIPCreator::Process::dPoint"<<i<<"::"<<DensityPoints.at(i)<<endl;
-         cout<<"MIPCreator::Process::oPoint"<<i<<"::"<<OpacityValues.at(i)<<endl;
-
+               cout<<"MIPCreator::Process::dPoint"<<i<<"::"<<DensityPoints.at(i)<<endl;
+           cout<<"MIPCreator::Process::oPoint"<<i<<"::"<<OpacityValues.at(i)<<endl;
             opacityTransferFunction->AddPoint(DensityPoints.at(i)*factor, OpacityValues.at(i));
         }
           //opacityTransferFunction = vtkPiecewiseFunction::New();
@@ -185,43 +171,45 @@ namespace bbvtk
 //        opacityTransferFunction->AddPoint( 210 ,   50.0/100.0 );
 //        opacityTransferFunction->AddPoint( 255 ,   90.0/100.0 );
 
-
-
           // Create a set of properties for mip
           vtkVolumeProperty *mipProperty;
           mipProperty = vtkVolumeProperty::New();
           mipProperty->SetScalarOpacity( opacityTransferFunction );
           mipProperty->SetColor( grayTransferFunction );
-
 //        mipProperty->SetInterpolationTypeToLinear();
           mipProperty->SetInterpolationTypeToNearest();
-
 //        mipProperty->ShadeOff();
           mipProperty->ShadeOn();
-
 //        mipProperty->SetAmbient(0.9);
 //        mipProperty->SetDiffuse(0.9);
 //        mipProperty->SetSpecular(0.9);
 
 
-
-
-
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7) 
         mMIP = vtkVolumeRayCastMIPFunction::New();
         mMIP->SetMaximizeMethodToScalarValue();
-
         mMapper = vtkVolumeRayCastMapper::New();
         mMapper->SetVolumeRayCastFunction(mMIP);
+#else 
+               mMapper = vtkFixedPointVolumeRayCastMapper::New();
+#endif
+
+               
+               mCast->Update();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
         mMapper->SetInput(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+        mMapper->SetInputData(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
 
         mVolume = vtkVolume::New();
         mVolume->SetMapper(mMapper);
         mVolume->SetProperty( mipProperty );
-
-
-
         mMapper->Update();
-
       bbSetOutputOut(mVolume);
      //     mVolume->GetProperty()->SetColor( bbGetInputColour()[0],  bbGetInputColour()[1], bbGetInputColour()[2] );
      //     mVolume->GetProperty()->SetOpacity( bbGetInputOpacity() );
index 486cc7ea6c7b5c5eafb24207e96428e754851ea6..124abe89cb4e980a139d1019716717b32533ede2 100644 (file)
 
 #include "vtkImageData.h"
 #include <vtkImageShiftScale.h>
-#include <vtkVolumeRayCastMIPFunction.h>
-#include <vtkVolumeRayCastMapper.h>
+
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include <vtkVolumeRayCastMIPFunction.h>
+       #include <vtkVolumeRayCastMapper.h>
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
+
+
 #include "vtkProp3D.h"
 #include "vtkVolume.h"
 
@@ -85,8 +93,18 @@ namespace bbvtk
     std::vector<double> DensityPoints;
     std::vector<double> OpacityValues;
     vtkImageShiftScale                 *mCast;
-    vtkVolumeRayCastMIPFunction                *mMIP;
-    vtkVolumeRayCastMapper             *mMapper;
+
+
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7) 
+    vtkVolumeRayCastMIPFunction                        *mMIP;
+    vtkVolumeRayCastMapper                             *mMapper;
+#else 
+    vtkFixedPointVolumeRayCastMapper   *mMapper;
+#endif
+
+
+
     vtkVolume                          *mVolume;
     vtkPiecewiseFunction *opacityTransferFunction;
     vtkPiecewiseFunction *grayTransferFunction;
index db2fdecf6c50d6ae5e944b7a4bfbd09030adf7ad..b6205e12e12491b6f3014f419bab7e9652c21f3f 100644 (file)
@@ -41,6 +41,8 @@ BBTK_BLACK_BOX_IMPLEMENTATION(Magnitud,bbtk::AtomicBlackBox);
 void Magnitud::Process()
 {
 
+printf("EED Magnitud::Process Start\n");
+
 // THE MAIN PROCESSING METHOD BODY
 //   Here we simply set the input 'In' value to the output 'Out'
 //   And print out the output value
@@ -54,37 +56,76 @@ void Magnitud::Process()
 //      (the one provided in the attribute 'type' of the tag 'input')
 
 // ---------- 
- if (bbGetInputIn()!=NULL) {
-   vGreenToRedLut->SetHueRange(0.6667,0.0);
-   vGreenToRedLut->Build();
+       if (bbGetInputIn()!=NULL) 
+       {
+               vGreenToRedLut->SetHueRange(0.6667,0.0);
+               vGreenToRedLut->Build();
   
   //Input Data
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vVecMagnitude->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vVecMagnitude->SetInputData(bbGetInputIn());
+#endif
+
    vVecMagnitude->NormalizeOff();
    vVecMagnitude->Update();
    vVecMagnitude->GetOutput()->GetScalarRange( range1 );
    vVecMagnitude->Update();
    
    //Glyph
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vMaskPoint->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vMaskPoint->SetInputData(bbGetInputIn());
+#endif
+
    vMaskPoint->SetOnRatio(100);
    vMaskPoint->Update();
    vMaskPoint->RandomModeOn();
-   
-   vGlyph->SetInput(vMaskPoint->GetOutput());
-   vGlyph->SetSource(cone->GetOutput());
+
    vGlyph->SetScaleModeToScaleByVector();
    vGlyph->SetColorModeToColorByVector();
    vGlyph->SetScaleFactor(0.20);
+   
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+   vGlyph->SetInput(vMaskPoint->GetOutput());
+   vGlyph->SetSource(cone->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vGlyph->SetInputData(vMaskPoint->GetOutput());
+       cone->Update();
+   vGlyph->SetSourceData(cone->GetOutput());
+#endif
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vGlyphMapper->SetInput( vGlyph->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vGlyphMapper->SetInputData( vGlyph->GetOutput() );
+#endif
+
    step = (range1[1]-range1[0])/10;
       
    //Contour
-   dRangeColorForMultipleContourVelocity[0]=0;
-   dRangeColorForMultipleContourVelocity[1]=1;
-   dRangeColorForGlyphVelocity[0]=0;
-   dRangeColorForGlyphVelocity[1]=1;
+   dRangeColorForMultipleContourVelocity[0]    = 0;
+   dRangeColorForMultipleContourVelocity[1]    = 1;
+   dRangeColorForGlyphVelocity[0]                      = 0;
+   dRangeColorForGlyphVelocity[1]                      = 1;
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vMultipleContourVelocity->SetInput((vtkDataSet *) vVecMagnitude->GetOutput()); 
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vMultipleContourVelocity->SetInputData((vtkDataSet *) vVecMagnitude->GetOutput()); 
+#endif
    
    index = 0;
    double h;
@@ -96,7 +137,14 @@ void Magnitud::Process()
       index+=1;
    }
    
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vMultipleContourMapper->SetInput( vMultipleContourVelocity->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vMultipleContourMapper->SetInputData( vMultipleContourVelocity->GetOutput() );
+#endif
+
    vMultipleContourMapper->SetScalarRange( range1 );
    vMultipleContourMapper->SetLookupTable( vGreenToRedLut );
    vMultipleContourMapper->Update();
@@ -109,8 +157,17 @@ void Magnitud::Process()
    vGlyphMapper->ImmediateModeRenderingOn();
  
    //Outline Grid
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vOutlineGrid->SetInput( bbGetInputIn() );
    vOutlineMapper->SetInput(vOutlineGrid->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vOutlineGrid->SetInputData( bbGetInputIn() );
+       vOutlineGrid->Update();
+   vOutlineMapper->SetInputData( vOutlineGrid->GetOutput() );
+#endif
+
    
    //Outline Grid Actor
    vOutlineActor->SetMapper(vOutlineMapper);
@@ -143,10 +200,14 @@ void Magnitud::Process()
    vGlyph->SetScaleFactor(vGlyph->GetScaleFactor()+0.1);
    vGlyph->Update();
    if( (bbGetInputScale()/100)<0 ) 
+       {
       bbSetInputScale(0);
+       }
    if( (bbGetInputScale()/100)>1 ) 
+       {
       bbSetInputScale(1);
-   
+   }
+
    //vGlyph->SetScaleFactor(dScale);
    vGlyph->SetScaleFactor( bbGetInputScale()/100 );
    vGlyph->Update();
@@ -166,9 +227,14 @@ void Magnitud::Process()
    vMultipleContourMapper->SetScalarRange( range1 );
 
    if( bbGetInputOpactity()/100<0 ) 
-      bbSetInputOpactity(0);
+       {
+       bbSetInputOpactity(0);
+       }
+
    if( bbGetInputOpactity()/100>1 ) 
-      bbSetInputOpactity(1);
+       {
+       bbSetInputOpactity(1);
+       }
 
    //Set Contour Opacity
    vMultipleContourActor->GetProperty()->SetOpacity( bbGetInputOpactity()/100 );
@@ -179,7 +245,9 @@ void Magnitud::Process()
 
    //Set The Number of Contours
    if( bbGetInputContour()<1) 
-      bbSetInputContour(1);
+       {
+               bbSetInputContour(1);
+       }
 
    step=(range1[1]-range1[0])/bbGetInputContour();
    index=0;
@@ -192,7 +260,13 @@ void Magnitud::Process()
    //End: Change values by the user
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    //The Plane Widget
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vPlaneWidget->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vPlaneWidget->SetInputData(bbGetInputIn());
+#endif
    vPlaneWidget->NormalToXAxisOn();
    vPlaneWidget->NormalToZAxisOn();
    vPlaneWidget->SetResolution(1);
@@ -203,7 +277,7 @@ void Magnitud::Process()
    vPlaneWidget->On();
 
    vPlaneWidget->GetOrigin(p0);
-   vPlaneWidget->GetCenter(c); //These is from Execute Method
+   vPlaneWidget->GetCenter(c); //These is fromvtkImageMathematics Execute Method
    vPlaneWidget->GetNormal(n);
    vPlaneWidget->GetPoint1(p1);
    vPlaneWidget->GetPoint2(p2);
@@ -228,7 +302,14 @@ void Magnitud::Process()
    vDiskSourceEED->SetCircumferentialResolution (20);
 
    //Stream Lines
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vPointWidget->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vPointWidget->SetInputData( bbGetInputIn() );
+#endif
+
    vPointWidget->AllOff();
    vPointWidget->PlaceWidget();
    //vPointWidget->SetInteractor(vIren);
@@ -246,8 +327,16 @@ void Magnitud::Process()
    source->SetCenter(  c );
    source->SetRadius(5.0);
    
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    streamer->SetInput( bbGetInputIn() );
    streamer->SetSource(source->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   streamer->SetInputData( bbGetInputIn() );
+   streamer->SetSourceData( source->GetOutput() );
+#endif
+
    streamer->SetIntegratorTypeToRungeKutta45();
    streamer->SetMaximumPropagation(500000);
 //EED    streamer->SetMaximumPropagationUnitToTimeUnit ();
@@ -257,13 +346,28 @@ void Magnitud::Process()
 //EED   streamer->ComputeVorticityOn ();
    streamer->Update();
 
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    rf->SetInput(streamer->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   rf->SetInputData(streamer->GetOutput());
+#endif
+
    rf->SetRadius(.5);
    rf->SetNumberOfSides(12);
    rf->SetVaryRadiusToVaryRadiusOff();
    
    streamer->GetOutput()->GetScalarRange( range );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    streamMapper2->SetInput(rf->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   streamMapper2->SetInputData(rf->GetOutput());
+#endif
+
    streamMapper2->SetLookupTable(vGreenToRedLut);
    //vStreamlineActor2->SetMapper( streamMapper2 );
    
@@ -285,40 +389,77 @@ void Magnitud::Process()
    //End: Part of the Execute Method
    //////////////////////////////////////////////////////////////////////////////////////
 
-   vtransformpolydatafilter->SetInput( vDiskSourceEED->GetOutput() );
    vtransformpolydatafilter->SetTransform( transformEED );
-   vtransformpolydatafilter->Update();
    
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+   vtransformpolydatafilter->SetInput( vDiskSourceEED->GetOutput() );
    vProbeslices->SetInput( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
    vProbeslices->SetSource( bbGetInputIn() ); 
+   vGlyphFlowPlane->SetInput( vProbeslices->GetOutput() );
+   vGlyphFlowPlane->SetSource( vArrowSource->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vtransformpolydatafilter->SetInputData( vDiskSourceEED->GetOutput() );
+   vProbeslices->SetInputData( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
+   vProbeslices->SetSourceData( bbGetInputIn() ); 
+   vGlyphFlowPlane->SetInputData( vProbeslices->GetOutput() );
+       vArrowSource->Update();
+   vGlyphFlowPlane->SetSourceData( vArrowSource->GetOutput() );
+#endif
+
+   vtransformpolydatafilter->Update();
    vProbeslices->Update( );
 
-   vGlyphFlowPlane->SetInput(vProbeslices->GetOutput());
-   vGlyphFlowPlane->SetSource(vArrowSource->GetOutput());
+
    vGlyphFlowPlane->SetScaleModeToScaleByVector();
    vGlyphFlowPlane->SetColorModeToColorByVector();
    vGlyphFlowPlane->SetScaleFactor(0.2);
    vGlyphFlowPlane->Update();
 
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vProbeslicesFlowWidget->SetInput( ( vtkDataSet* )vPlanSource->GetOutput());
    vProbeslicesFlowWidget->SetSource( vVecMagnitude->GetOutput() ); 
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vProbeslicesFlowWidget->SetInputData( ( vtkDataSet* )vPlanSource->GetOutput());
+       vVecMagnitude->Update();
+   vProbeslicesFlowWidget->SetSourceData( vVecMagnitude->GetOutput() ); 
+#endif
+
    vProbeslicesFlowWidget->Update( );
       
    vVecMagnitude->GetOutput()->GetScalarRange( range );
 
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vAppendDataForFlowWidgetVisualisation->AddInput(vGlyphFlowPlane->GetOutput());
    vAppendDataForFlowWidgetVisualisation->AddInput(vProbeslicesFlowWidget->GetPolyDataOutput());
-
    vSliceMapper->SetInput( vAppendDataForFlowWidgetVisualisation->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       vGlyphFlowPlane->Update(); 
+       vProbeslicesFlowWidget->Update(); 
+   vAppendDataForFlowWidgetVisualisation->AddInputData( vGlyphFlowPlane->GetOutput() );
+   vAppendDataForFlowWidgetVisualisation->AddInputData( vProbeslicesFlowWidget->GetPolyDataOutput() );
+   vSliceMapper->SetInputData( vAppendDataForFlowWidgetVisualisation->GetOutput() );
+#endif
+
    vSliceMapper->SetScalarRange( range );
    vSliceMapper->SetLookupTable( vGreenToRedLut );
    
    vSliceActor->SetMapper( vSliceMapper );
 
    if(bbGetInputShowPlane() == 1)
+       {
       vPlaneWidget->On();
-   else if(bbGetInputShowPlane() == 0)
+       } else if(bbGetInputShowPlane() == 0) {
       vPlaneWidget->Off();
+       }
 
    vSliceActor->GetProperty()->SetOpacity( bbGetInputShowPlane() );
 
@@ -329,21 +470,25 @@ void Magnitud::Process()
    bbSetOutputOut2( vGlyphActor );
    bbSetOutputOut3( vOutlineActor );
    bbSetOutputOut4( vMultipleContourActor );
-   //bbSetOutputOut5( vScalarBarActor );
+
+//   bbSetOutputOut5( vScalarBarActor );
+
    if(bbGetInputShowStream() == 1)
+       {
       vStreamlineActor2->SetMapper( streamMapper2 );
-   else 
+       }   else {
       vStreamlineActor2->SetMapper( NULL );
-
+       }
    bbSetOutputOut5( vStreamlineActor2 );
    //bbSetOutputOut5( vStreamlineActor2 );
    //bbSetOutputOutExport( exporter );
    //temp->GetData( (vtkInformation*) vMultipleContourVelocity->GetOutput() );
    //temp->GetData( vMultipleContourMapper->GetOutput() );
    //bbSetOutputOutTest( temp );
+ } // if
 
+printf("EED Magnitud::Process End\n");
 
- } // if
 
 } // process
 
@@ -385,13 +530,13 @@ void Magnitud::bbUserInitializeProcessing()
 //    if any 
 
 // ---------- [
-   cone = vtkArrowSource::New();
-   exporter = vtkImageExport::New();
-   point = vtkPolyData::New();
-   rf = vtkTubeFilter::New();
-   source = vtkPointSource::New();
-   streamer = vtkStreamTracer::New();
-   streamMapper2 = vtkPolyDataMapper::New();
+   cone                                        = vtkArrowSource::New();
+   exporter                            = vtkImageExport::New();
+   point                                       = vtkPolyData::New();
+   rf                                          = vtkTubeFilter::New();
+   source                                      = vtkPointSource::New();
+   streamer                            = vtkStreamTracer::New();
+   streamMapper2                       = vtkPolyDataMapper::New();
    
    transformEED             = vtkTransform::New();
    vAppendDataForFlowWidgetVisualisation = vtkAppendPolyData::New();
@@ -402,7 +547,7 @@ void Magnitud::bbUserInitializeProcessing()
    vGlyphFlowPlane          = vtkGlyph3D::New();
    vGlyphMapper             = vtkPolyDataMapper::New();
    vGreenToRedLut           = vtkLookupTable::New();
-   vIren                    = vtkRenderWindowInteractor::New();
+//   vIren                    = vtkRenderWindowInteractor::New();
    vMaskPoint               = vtkMaskPoints::New();
    vMultipleContourActor    = vtkActor::New();
    vMultipleContourMapper   = vtkPolyDataMapper::New();
index 28f63ab656ea6adb3cdfb0ba81c9412e60028b3f..c3d673735b909fa31a941161b6cda435bc120144 100644 (file)
@@ -110,66 +110,66 @@ class bbvtk_EXPORT Magnitud
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 // -------------- [
-   vtkImageDatatemp;
-   std::vector<double> tempc;
-
-   int sizeIma;
-   long int index;
-   double p0[3], p1[3],p2[3], n[3], c[3], slCenter[3];
-   double range[2];
-   double range1[2];
-   double step;
-   double h;
-   double nx;
-   double ny;
-   double nz;
-   double alfa;
-   double beta;
-   double dRangeColorForGlyphVelocity[2];
-   double dRangeColorForMultipleContourVelocity[2];
-   double dRangeColorForGlyphVelocityForFlowPlane[2];
-
-   int Ratio;
-   double dOpactity;
-   double dScale;
-   int nContour;
-   bool bShow;
+   vtkImageData                                        *temp;
+   std::vector<double>                         tempc;
+
+   int                                                         sizeIma;
+   long                                                int index;
+   double                                              p0[3], p1[3],p2[3], n[3], c[3], slCenter[3];
+   double                                              range[2];
+   double                                              range1[2];
+   double                                              step;
+   double                                              h;
+   double                                              nx;
+   double                                              ny;
+   double                                              nz;
+   double                                              alfa;
+   double                                              beta;
+   double                                              dRangeColorForGlyphVelocity[2];
+   double                                              dRangeColorForMultipleContourVelocity[2];
+   double                                              dRangeColorForGlyphVelocityForFlowPlane[2];
+
+   int                                                         Ratio;
+   double                                              dOpactity;
+   double                                              dScale;
+   int                                                         nContour;
+   bool                                                bShow;
    
-   vtkActorvGlyphActor;
-   vtkActorvMultipleContourActor;
-   vtkActorvOutlineActor;
-   vtkActorvSliceActor;
-   vtkActorvStreamlineActor2;
-   vtkAppendPolyDatavAppendDataForFlowWidgetVisualisation;
-   vtkArrowSourcecone;
-   vtkArrowSourcevArrowSource;
-   vtkContourFiltervMultipleContourVelocity;
-   vtkDiskSourcevDiskSourceEED;
-   vtkGlyph3DvGlyph;
-   vtkGlyph3DvGlyphFlowPlane;
-   vtkImageExportexporter;
-   vtkLookupTablevGreenToRedLut;
-   vtkMaskPointsvMaskPoint;
-   vtkPlaneSourcevPlanSource;
-   vtkProbeFiltervProbeslices;
-   vtkProbeFiltervProbeslicesFlowWidget;
-   vtkPlaneWidgetvPlaneWidget;
-   vtkPolyDatapoint;
-   vtkPolyDataMappervSliceMapper;
-   vtkPointSourcesource;
-   vtkPointWidgetvPointWidget;
-   vtkPolyDataMappervGlyphMapper;
-   vtkPolyDataMappervMultipleContourMapper;
-   vtkOutlineFiltervOutlineGrid;
-   vtkPolyDataMappervOutlineMapper;
-   vtkPolyDataMapperstreamMapper2;
-   vtkRenderWindowInteractorvIren;
-   vtkScalarBarActorvScalarBarActor;
-   vtkStreamTracerstreamer;
-   vtkTransformtransformEED;
-   vtkTransformPolyDataFiltervtransformpolydatafilter;
-   vtkTubeFilterrf;
-   vtkVectorNormvVecMagnitude;
+   vtkActor                                            *vGlyphActor;
+   vtkActor                                            *vMultipleContourActor;
+   vtkActor                                            *vOutlineActor;
+   vtkActor                                            *vSliceActor;
+   vtkActor                                            *vStreamlineActor2;
+   vtkAppendPolyData                   *vAppendDataForFlowWidgetVisualisation;
+   vtkArrowSource                              *cone;
+   vtkArrowSource                              *vArrowSource;
+   vtkContourFilter                            *vMultipleContourVelocity;
+   vtkDiskSource                               *vDiskSourceEED;
+   vtkGlyph3D                                  *vGlyph;
+   vtkGlyph3D                                  *vGlyphFlowPlane;
+   vtkImageExport                              *exporter;
+   vtkLookupTable                              *vGreenToRedLut;
+   vtkMaskPoints                               *vMaskPoint;
+   vtkPlaneSource                              *vPlanSource;
+   vtkProbeFilter                              *vProbeslices;
+   vtkProbeFilter                              *vProbeslicesFlowWidget;
+   vtkPlaneWidget                              *vPlaneWidget;
+   vtkPolyData                                 *point;
+   vtkPolyDataMapper                   *vSliceMapper;
+   vtkPointSource                              *source;
+   vtkPointWidget                              *vPointWidget;
+   vtkPolyDataMapper                   *vGlyphMapper;
+   vtkPolyDataMapper                   *vMultipleContourMapper;
+   vtkOutlineFilter                            *vOutlineGrid;
+   vtkPolyDataMapper                   *vOutlineMapper;
+   vtkPolyDataMapper                   *streamMapper2;
+   vtkRenderWindowInteractor   *vIren;
+   vtkScalarBarActor                   *vScalarBarActor;
+   vtkStreamTracer                             *streamer;
+   vtkTransform                                        *transformEED;
+   vtkTransformPolyDataFilter  *vtransformpolydatafilter;
+   vtkTubeFilter                               *rf;
+   vtkVectorNorm                               *vVecMagnitude;
 // -------------- ]
 
 };
@@ -177,7 +177,7 @@ class bbvtk_EXPORT Magnitud
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(Magnitud,bbtk::AtomicBlackBox);
 BBTK_NAME("Magnitud");
 BBTK_AUTHOR("seba-tor@uniandes.edu.co");
-BBTK_DESCRIPTION("Receive an ImgaData and generates an Actor");
+BBTK_DESCRIPTION("Receive an ImgaData and generates an Actor. 'EED this box habe to be splited in 5 box'");
 BBTK_CATEGORY("");
 // -------------- [
   BBTK_INPUT(Magnitud,In,"Receive the image source",vtkImageData*, "");
index c192648b2747b206f4ba2f5600997b851cabb72c..58a2c739344f021adec9f3ad0871f92716aa2f94 100644 (file)
@@ -26,14 +26,19 @@ void MaskPoint::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
-printf("EED MaskPoint::Process Start\n");
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        maskpoints->SetInput( bbGetInputIn() );  
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       maskpoints->SetInputData( bbGetInputIn() );  
+#endif
+
        maskpoints->SetOnRatio( bbGetInputRatio() );
        maskpoints->RandomModeOn();     
        maskpoints->SetMaximumNumberOfPoints(5000);     
        maskpoints->Update();
        bbSetOutputOut( maskpoints->GetOutput() );
-printf("EED MaskPoint::Process End\n");
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
index 6e0d0944d3249ca1bbd2a34ec7b03526a6eeef1e..28c9a2c55ea06ac916d2f4b78247300f0cd32664 100644 (file)
@@ -40,7 +40,7 @@ class bbvtk_EXPORT MaskPoint
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(MaskPoint,bbtk::AtomicBlackBox);
 BBTK_NAME("MaskPoint");
 BBTK_AUTHOR("ED at InfoDev Creatis");
-BBTK_DESCRIPTION("vtkMaskPoint");
+BBTK_DESCRIPTION("vtkMaskPoint. See Vectors/Tensors Examples");
 BBTK_CATEGORY("empty");
   BBTK_INPUT(MaskPoint,In,"vtkImageData",vtkImageData*,"");
   BBTK_INPUT(MaskPoint,Ratio,"Ratio",int,"");
index 0a09e3c92715a20f4a470c6441cc713a7ef1fa8c..21f22d72fcc6b1611ad7d0d08a8c55d423940529 100644 (file)
  
  <process><PRE>
    vtkMetaImageWriter* w = vtkMetaImageWriter::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    bbGetInputIn()->Update();
+#else
+       // ...
+#endif
 
 /*
    if (bbGetInputIn() == 0)
 
   if (bbGetInputIn()!=NULL)
   {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
      w->SetInput(bbGetInputIn());
+#else
+     w->SetInputData(bbGetInputIn());
+#endif
      w->SetCompression(bbGetInputCompression());  
      w->SetFileDimensionality(bbGetInputIn()->GetDataDimension()); // NTU
      std::string userGivenName = bbGetInputFilename();
index c667b6eaba55365605e0b73614d49be5a4d1a053..6d77609279c0ae6bd586e0de8dcd6540ad75ddc9 100644 (file)
@@ -92,11 +92,9 @@ namespace bbvtk
          ( bbGetInputStatus("Y") != bbtk::UPTODATE ) )
        {
         if  ( bbGetInputX().size() != bbGetInputY().size() ) 
-          bbtkError(bbGetFullName()
-                    <<" : input vectors X and Y do not have the same size"); 
+          bbtkError(bbGetFullName() <<" : input vectors X and Y do not have the same size"); 
         if  ( bbGetInputX().size() < 2 ) 
-          bbtkError(bbGetFullName()
-                    <<" : input vectors X and Y have a size < 2"); 
+          bbtkError(bbGetFullName() <<" : input vectors X and Y have a size < 2"); 
         bbGetOutputOut()->RemoveAllPoints ();
         //      std::cout << bbGetInputX().size()<< ","<< bbGetInputY().size()<< std::endl;
         std::vector<float>::const_iterator x,y;
@@ -108,10 +106,11 @@ namespace bbvtk
           {
             //              std::cout << *x << " -> " << *y << std::endl;
             bbGetOutputOut()->AddPoint(*x,*y);
-          }
-       }
+          } // for x ,y
+       } // if InputX
    }
 
+
 }//namespace bbtk
 
 #endif // _USE_VTK_
index 954792d300e0d7e859699afbe8a2adbaca4fffc4..58572ef895eab27eae92352387aceab780d88731 100644 (file)
@@ -87,7 +87,7 @@ namespace bbvtk
   BBTK_BEGIN_DESCRIBE_BLACK_BOX(PiecewiseFunction,bbtk::AtomicBlackBox);
   BBTK_NAME("PiecewiseFunction");
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
-  BBTK_DESCRIPTION("Creates a piecewise function");
+  BBTK_DESCRIPTION("Creates a piecewise function  ( see exampleVolumeRendering )");
   BBTK_CATEGORY("misc");
   BBTK_INPUT(PiecewiseFunction,X,"X coords of the points of the function",
             std::vector<float>,"");
index e3432ee67f12f5bdb9eec91466d2d5668e8385ca..9e63987690a16c1fcd6fb8757738a5505ffb18ca 100644 (file)
@@ -26,7 +26,14 @@ void PlaneClipPolyData::Process()
        plane->SetNormal(normal[0],normal[1],normal[2]);
 
        vtkClipPolyData* clipper = vtkClipPolyData::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        clipper->SetInputConnection(inPolyData->GetProducerPort());
+#else
+       clipper->SetInputData(inPolyData);
+#endif
+
        clipper->SetClipFunction(plane);
        clipper->Update();
 
index e6bc5b639627b5d8f2870c771ff2a554c1c0ef4e..2f7c44f770cbd9ecc4c3ce3e681b0c7b2183c85d 100644 (file)
@@ -82,9 +82,14 @@ void PolyDataReaderPlus::Process()
        vtkActor *actor = (vtkActor*)bbGetOutputOutActor();
        vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        mapper->SetInput(informacion);
-       actor->SetMapper(mapper);
+#else
+       mapper->SetInputData(informacion);
+#endif
 
+       actor->SetMapper(mapper);
        bbSetOutputOutActor(actor);
 
        if (bbGetInputInColor().size()  >= 3)
index d56af36bab4d4e0a0d3366ca2b0a214c9b4dd952..ed7966c13c7f48e50ba0572d2d847cdbdb9762b7 100644 (file)
@@ -109,8 +109,15 @@ namespace bbvtk
 
                if (bbGetInputActive()==true)
                {
-                       polydatamapper->SetInput( bbGetInputIn() );
-                       vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+                        polydatamapper->SetInput( bbGetInputIn() );
+#else
+                        polydatamapper->SetInputData( bbGetInputIn() );
+#endif
+
+                        vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
+
                        if (bbGetInputRepresentation()==1)
                        {
                                 vtkactor->GetProperty()->SetAmbient(1);
@@ -120,7 +127,6 @@ namespace bbvtk
 printf("EED WARNNING!  PolyDataToActor::DoProcess  which is the default values of Ambient, Diffuse, Specular ? \n");
                        }
 
-
                         vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
                           
                         vtkactor->GetProperty()->SetColor( bbGetInputColour()[0],  
index a2a583cd97cf7236334917fd7d5105d26d209792..9fec3be1e010e01c80d7d145882204c7fa2adb52 100644 (file)
@@ -16,8 +16,6 @@
  
  <process><PRE>
 
-     printf("EED PolyDataWriter::Process() %s\n", bbGetInputFilename().c_str());
-
    vtkPolyDataWriter* w = vtkPolyDataWriter::New();
    if (bbGetInputFileType()==0) 
        {
        } else {
                w->SetFileTypeToBinary();
        }
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    bbGetInputIn()->Update();
    w->SetInput(bbGetInputIn());
+#else
+   w->SetInputData(bbGetInputIn());
+#endif
+
    w->SetFileName(bbGetInputFilename().c_str());
    w->Update();   
    w->Write();
index bca2a1cd037694130ae608e99478bf6a796f67ce..e960ef44dee4bef035987ca8425aece4efc86764 100755 (executable)
@@ -32,9 +32,10 @@ namespace bbvtk
 
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,PolyDataWriterPlus)
 BBTK_BLACK_BOX_IMPLEMENTATION(PolyDataWriterPlus,bbtk::AtomicBlackBox);
+
 void PolyDataWriterPlus::Process()
 {
-       std::cout << "[" << this << "]" << "PolyDataWriterPlus::Process()..." << std::endl;
+//     std::cout << "[" << this << "]" << "PolyDataWriterPlus::Process()..." << std::endl;
        //Review the observers...
 
        if (!HasObserver(OBS_PRE_WRITER_1) && bbGetInputInPrePersistObs1() != NULL)
@@ -59,35 +60,35 @@ void PolyDataWriterPlus::Process()
                {
                        std::cout << "Set In." << std::endl;
                        return;
+               } else {
+                       vtkProp3D* actor                        = bbGetInputIn2();
+                       vtkPolyDataMapper* mapper       = ((vtkPolyDataMapper*)((vtkActor*)actor)->GetMapper());
+                       cosa                                            = mapper->GetInput();
                }
-               else
-               {
-                       vtkProp3D* actor = bbGetInputIn2();
-                       vtkPolyDataMapper* mapper = ((vtkPolyDataMapper*)((vtkActor*)actor)->GetMapper());
-                       cosa = mapper->GetInput();
-               }
-       }
-       else
-       {
+       } else {
                cosa = bbGetInputIn();
        }
 
        std::string nuevo_nombre = guessName(bbGetInputInPath());
 
-
        vtkPolyData* entrada = cosa;
-       std::cout << "Before writing" << std::endl;
-       entrada->Print(std::cout);
+//     std::cout << "Before writing" << std::endl;
+//     entrada->Print(std::cout);
 
        std::vector< std::string > partes = StringSplit(nuevo_nombre, ".");
        std::string extension = partes.at(partes.size()-1);
 
-       std::cout << "Extension (vtk, vtp o stl?) => " << extension << std::endl;
-
-
+//     std::cout << "Extension (vtk, vtp o stl?) => " << extension << std::endl;
 
        vtkDataSetSurfaceFilter* surfaceFilter = vtkDataSetSurfaceFilter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        surfaceFilter->SetInput(entrada);
+#else
+       surfaceFilter->SetInputData(entrada);
+#endif
+
        surfaceFilter->Update();
        //vtkPolyData* polydata = surfaceFilter->GetOutput();
        entrada = surfaceFilter->GetOutput();
@@ -95,7 +96,14 @@ void PolyDataWriterPlus::Process()
        if (extension.compare("vtk") == 0)
        {
                vtkPolyDataWriter* writer = vtkPolyDataWriter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                writer->SetInput(entrada);
+#else
+               writer->SetInputData(entrada);
+#endif
+
                writer->SetFileName(nuevo_nombre.data());
                writer->Write();
                writer->Delete();
@@ -105,7 +113,14 @@ void PolyDataWriterPlus::Process()
        {
                vtkXMLPolyDataWriter* writer = vtkXMLPolyDataWriter::New();
                writer->SetFileName ( nuevo_nombre.data() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                writer->SetInput ( entrada );
+#else
+               writer->SetInputData ( entrada );
+#endif
+
                writer->Write();
                writer->Delete();
        }
@@ -114,7 +129,14 @@ void PolyDataWriterPlus::Process()
        {
                vtkSTLWriter* writer = vtkSTLWriter::New();
                writer->SetFileName ( nuevo_nombre.data() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                writer->SetInput ( entrada );
+#else
+               writer->SetInputData ( entrada );
+#endif
+
                writer->Write();
                writer->Print(std::cout);
                writer->Delete();
@@ -124,6 +146,7 @@ void PolyDataWriterPlus::Process()
 
        InvokeEvent(OBS_POST_WRITER_1);
 }
+
 void PolyDataWriterPlus::bbUserSetDefaultValues()
 {
 
index 7e2ec118f1ba0b6ac14f1b2815346350db2a75d9..be65433099dea4f14df089bba0490d545c9f6205 100755 (executable)
@@ -74,7 +74,7 @@ BBTK_DESCRIPTION("_description_");
 BBTK_CATEGORY("__CATEGORY__");
 BBTK_INPUT(PolyDataWriterPlus,InPrePersistObs1,"Who will be notified before persist", vtkCommand*,"");
 BBTK_INPUT(PolyDataWriterPlus,InPostPersistObs1,"Who will be notified after persist", vtkCommand*,"");
-BBTK_INPUT(PolyDataWriterPlus,InPath,"Path to the file to be created or rewrited",std::string,"");
+BBTK_INPUT(PolyDataWriterPlus,InPath,"Path to the file to be created or rewrited (.vtk file)",std::string,"");
 BBTK_INPUT(PolyDataWriterPlus,In,"Information to be saved", vtkPolyData*,"");
 BBTK_INPUT(PolyDataWriterPlus,In2,"Information to be saved", vtkProp3D*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(PolyDataWriterPlus);
index 4007cfbe93960a848c73032ecfffa4ef2e558f6b..6dc66a9a49e6e98ea8742e51b14f1cb5099d8915 100644 (file)
@@ -26,16 +26,19 @@ void ProbeFilter::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
-printf("EED ProbeFilter::Process() Start\n");
-
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
       _probefilter->SetSource( bbGetInputSource() ); 
       _probefilter->SetInput( bbGetInputInput() ); 
+#else
+      _probefilter->SetSourceData( bbGetInputSource() ); 
+      _probefilter->SetInputData( bbGetInputInput() ); 
+#endif
+
       _probefilter->Update();
       bbSetOutputOut( _probefilter->GetOutput() );
 
-printf("EED ProbeFilter::Process() End\n");
-
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
index 117b97931a3c68e7634a99f9cb074b2d4e5ceb6b..e9cf56dc03e893b951d6bfd9534afaf84810724e 100644 (file)
@@ -43,6 +43,7 @@ BBTK_BLACK_BOX_IMPLEMENTATION(RescaleSlopeIntercept,bbtk::AtomicBlackBox);
 //===== 
 void RescaleSlopeIntercept::Process()
 {
+printf("RescaleSlopeIntercept::Process Start\n");
 
 // THE MAIN PROCESSING METHOD BODY
 //   Here we simply set the input 'In' value to the output 'Out'
@@ -110,25 +111,50 @@ void RescaleSlopeIntercept::Process()
                        shift= A + (range[1]*newdifrange/difrange);
                } // if type 3
                
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                filter1->SetInput( bbGetInputIn() );
+#else
+               filter1->SetInputData( bbGetInputIn() );
+#endif
+
                filter1->SetOutputScalarType( VTK_DOUBLE );
                filter1->SetShift( 0 );
                filter1->SetScale( scale );
                
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                filter2->SetInput( filter1->GetOutput() );
+#else
+               filter2->SetInputData( filter1->GetOutput() );
+#endif
+
                filter2->SetOutputScalarType( outputformat );
                filter2->SetShift( shift );
                filter2->SetScale( 1 );
                
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                mchange->SetInput( filter2->GetOutput() );
+#else
+               mchange->SetInputData( filter2->GetOutput() );
+#endif
+
                mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
                mchange->SetOutputSpacing (spc);
+               filter1->Update();    //important
+               filter2->Update();    //important
                mchange->Update();    //important
                bbSetOutputOut( mchange->GetOutput() );
+printf("RescaleSlopeIntercept::Process A\n");
                
        } else  {
+printf("RescaleSlopeIntercept::Process B\n");
                bbSetOutputOut( NULL );
        }               // if bbGetInputIn      
+printf("RescaleSlopeIntercept::Process End\n");
+
 }
        
        
index 3b28389b314c7ba907561d6707610220205a9f43..a04f6bdc11655b7a6948ef72cc4588766dc9ed95 100644 (file)
@@ -84,15 +84,27 @@ namespace bbvtk
        {
 
                thresh2 = vtkImageThreshold::New();
-                       thresh2->SetInValue(255);
-                       thresh2->SetOutputScalarTypeToUnsignedChar();
+               thresh2->SetInValue(255);
+               thresh2->SetOutputScalarTypeToUnsignedChar();
                connect2 = vtkImageSeedConnectivity::New();
-                       connect2->SetInput(thresh2->GetOutput());
-                       connect2->SetInputConnectValue(255);
-                       connect2->SetOutputConnectedValue( 255 );
-                       connect2->SetOutputUnconnectedValue(0);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               connect2->SetInput(thresh2->GetOutput());
+#else
+               connect2->SetInputData(thresh2->GetOutput());
+#endif
+
+               connect2->SetInputConnectValue(255);
+               connect2->SetOutputConnectedValue( 255 );
+               connect2->SetOutputUnconnectedValue(0);
                cast4 = vtkImageCast::New();
-                       cast4->SetInput(connect2->GetOutput());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               cast4->SetInput(connect2->GetOutput());
+#else
+               cast4->SetInputData(connect2->GetOutput());
+#endif
 
 // EED 2016 06 15
 
@@ -157,18 +169,32 @@ namespace bbvtk
        {
                int outputformat = bbtkStaticLecture::GetTypeFormat( bbGetInputOutputFormat() , bbGetInputIn() );
                vtkImageData *imagedata = bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imagedata->UpdateInformation();
                imagedata->SetUpdateExtent(imagedata->GetWholeExtent());
                imagedata->Update();
-               thresh2->ThresholdBetween(3000, 3001);
                thresh2->SetInput(imagedata);
+#else
+               imagedata->SetExtent(imagedata->GetExtent());
+               thresh2->SetInputData(imagedata);
+#endif
+
+               thresh2->ThresholdBetween(3000, 3001);
                thresh2->ThresholdBetween(bbGetInputThresholdMinMax()[0], bbGetInputThresholdMinMax()[1]);
                thresh2->Modified();
                thresh2->Update();
                connect2->RemoveAllSeeds ();
 
                int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imagedata->GetWholeExtent(ext);
+#else
+               imagedata->GetExtent(ext);
+#endif
+
                int maxX = ext[1]-ext[0]+1;
                int maxY = ext[3]-ext[2]+1;
                int maxZ = ext[5]-ext[4]+1;
index 473b276042177499e0a299de62b7be97cacc0455..497e304db098280df9ef29b6f1dcbd4b8ffc42bd 100755 (executable)
@@ -70,9 +70,16 @@ printf("EED **********************************   >> use bbtk-box creaMaracasVisu
                final = vtkImageData::New();
                final->SetSpacing(space);
                final->SetDimensions(newDim);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                final->SetScalarType(scalar_type);
                final->AllocateScalars();
                final->Update();
+#else
+               final->AllocateScalars(scalar_type,1);
+#endif
+
        }
 
        bbSetOutputMax(max_z);
@@ -141,7 +148,13 @@ printf("EED **********************************   >> use bbtk-box creaMaracasVisu
        }
 
        caster = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        caster->SetInput(final);
+#else
+       caster->SetInputData(final);
+#endif
+
        caster->SetOutputScalarTypeToShort();
        caster->Update();
 
index 616f088d4b5093246a909ec71b00e15bcad69b65..cde4561ad0c8eb6e629f2c7bc3a26c3afa8d2fcd 100644 (file)
@@ -42,17 +42,15 @@ double SphereList::GetRadio(int i)
 {
     double radio;
        if ( bbGetInputlstRadio().size()==0 )
-        {
-            radio = 1.0;
-        } else if ( i<bbGetInputlstRadio().size() )
+    {
+               radio = 1.0;
+       } else if ( i<bbGetInputlstRadio().size() )
        {
-            radio = bbGetInputlstRadio()[i];
-        } else  
-        {
-            radio = bbGetInputlstRadio()[ bbGetInputlstRadio().size() - 1 ];
-        }  
-
-       return radio;
+               radio = bbGetInputlstRadio()[i];
+       } else {
+       radio = bbGetInputlstRadio()[ bbGetInputlstRadio().size() - 1 ];
+    }  
+       return radio;
 }
 
 
@@ -100,6 +98,8 @@ void SphereList::GetColor(int i, double &cr,double &cg,double &cb)
 
 void SphereList::Process()
 {
+printf("EED SphereList::Process Start\n");
+
        if (bbGetInputRenderer()!=NULL)
        {
                int sizeLstX=bbGetInputlstPointX().size();      
@@ -135,7 +135,15 @@ void SphereList::Process()
                                        newSphere -> SetPhiResolution(20);
                                        newSphere -> SetRadius( 1 ); 
                                        vtkPolyDataMapper * newMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                                        newMapper -> SetInput( newSphere -> GetOutput() );      
+#else
+                                       newSphere -> Update();
+                                       newMapper -> SetInputData( newSphere -> GetOutput() );  
+#endif
+
                                        vtkActor * newActor = vtkActor::New();
                                        sphereActor.push_back(newActor);
                                        newActor -> SetMapper(newMapper);
@@ -163,6 +171,7 @@ void SphereList::Process()
                 sphereActor[i] -> GetProperty() -> SetOpacity( bbGetInputOpacity() );
                 sphereActor[i] -> GetProperty() -> SetColor( cr,cg,cb );
                 vtkspheresourceLst[i] -> SetRadius( GetRadio(i) ); 
+                       vtkspheresourceLst[i] -> Update();
                } // for i
 
                if (sphereActor.size() != 0)
index fdc775afc1868d6dff5a855c158d9ef56e858db8..070da9519e575347b8a23ae63fa3b85d157b2e02 100644 (file)
@@ -80,8 +80,8 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(SphereList,bbtk::AtomicBlackBox);
        BBTK_INPUT(SphereList,lstPointY,"List of Y coordinates. Requirement: same size as vector X and vector Z.",std::vector<double>,"");
        BBTK_INPUT(SphereList,lstPointZ,"List of Z coordinates. Requirement: same size as vector X and vector Y.",std::vector<double>,"");
        BBTK_INPUT(SphereList,lstRadio,"List of Radio values",std::vector<double>,"");
-       BBTK_INPUT(SphereList,Colour,"Colour RGB values for the spheres (3 first values of the vector for the first sphere, following values for the second sphere, etc.)",std::vector<double>,"");
-       BBTK_INPUT(SphereList,Opacity,"Opacity of the spheres",double,"");
+       BBTK_INPUT(SphereList,Colour,"Colour RGB values for the spheres (default [1 0 0])  (3 first values of the vector for the first sphere, following values for the second sphere, etc.)",std::vector<double>,"");
+       BBTK_INPUT(SphereList,Opacity,"Opacity of the spheres (default 1)",double,"");
        BBTK_INPUT(SphereList,Spacing,"(default [1 1 1]) Spacing vector [sx sy sz]",std::vector<double>,"");
 BBTK_INPUT(SphereList,Transform,"vtkTransform",vtkLinearTransform*,"");
 
index 463fca033660643d7873fc5932cd6c315c2c7aaa..c526c82bd8b303fcd26d1c5c7bf73b455a119379 100644 (file)
@@ -14,9 +14,9 @@
 <input name="CenterX" type="double" description="Center X coord"/>
 <input name="CenterY" type="double" description="Center Y coord"/>
 <input name="CenterZ" type="double" description="Center Z coord"/>
-<input name="PhiResolution" type="int" description="Sphere PhiResolution" special="vtk parameter" />
-<input name="Radius" type="double" description="Sphere Radius" special="vtk parameter" />
-<input name="ThetaResolution" type="int" description="Sphere ThetaResolution" special="vtk parameter" />
+<input name="PhiResolution" type="int" description="Sphere PhiResolution  (default 10)" special="vtk parameter" />
+<input name="Radius" type="double" description="Sphere Radius  (default 10)" special="vtk parameter" />
+<input name="ThetaResolution" type="int" description="Sphere ThetaResolution  (default 10)" special="vtk parameter" />
 
 <process>
 <PRE>
@@ -38,6 +38,9 @@ if (bbGetInputActive()==true)
 
 <defaultValues><PRE>
   bbSetInputActive(true);
+  bbSetInputRadius(10);
+  bbSetInputPhiResolution(10);
+  bbSetInputThetaResolution(10);
 </PRE></defaultValues>
 
 </blackbox>
index 930eb905d3e42836a4ebdca03ede83617b1391f1..917a66effc0896ca8f942a5f3b1f5a33c9f537b8 100644 (file)
@@ -59,9 +59,15 @@ void StructuredPointsReader::Process()
     if ( bbGetInputIn().c_str()!=empty)
        {
                spr -> SetFileName( bbGetInputIn().c_str() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                sp = spr->GetOutput();
                sp -> Update();
                bbSetOutputOut( sp );
+#else
+               spr -> Update();
+               bbSetOutputOut( spr->GetOutput() );
+#endif
        } else {
                bbSetOutputOut( NULL );
        }
index f0b0be3f9e50dbcfc4218734eb219898c3b51d9f..76b0b6d953f49286a4ac0530ef2917d1352640bc 100644 (file)
@@ -40,7 +40,15 @@ void SurfaceTexture::Process()
        int ext[6];
        bbGetInputImage()->GetSpacing(spc);
        bbGetInputImage()->GetScalarRange(range);
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        bbGetInputImage()->GetWholeExtent(ext);
+#else
+       bbGetInputImage()->GetExtent(ext);
+#endif
+
        int maxX = ext[1]-ext[0]+1;
        int maxY = ext[3]-ext[2]+1;
        int maxZ = ext[5]-ext[4]+1;
index db9240b3e3ac126296855cfad4735d9e7db5d6df..de512515dfbc60118cdce2a615695cc02dab4e0b 100644 (file)
@@ -59,7 +59,14 @@ void TemporalPicker::Process()
        {
                int ext[6];
                int sizeX,sizeY,sizeZ;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                bbGetInputIn()->GetWholeExtent(ext);
+#else
+               bbGetInputIn()->GetExtent(ext);
+#endif
+
                sizeX=ext[1]-ext[0]+1;
                sizeY=ext[3]-ext[2]+1;
                sizeZ=ext[5]-ext[4]+1;
index da74b9046726d50c734c9d92c8865642a114ccec..f41e64252f75ae0d3f99f6dbf25ede0b44b15529 100644 (file)
@@ -62,7 +62,7 @@ class bbvtk_EXPORT TemporalPicker
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(TemporalPicker,bbtk::AtomicBlackBox);
        BBTK_NAME("TemporalPicker");
        BBTK_AUTHOR("Info-Dev");
-       BBTK_DESCRIPTION("Pick vector in Z direction");
+       BBTK_DESCRIPTION("Pick vector in Z direction  (2D+t => 3D)");
        BBTK_CATEGORY("");
        BBTK_INPUT(TemporalPicker,In,"Input image",vtkImageData*,"");
        BBTK_INPUT(TemporalPicker,SizeRegion,"Size region (default 1)",int,"");
index 49c617ea587792beed30ad61a878c206874b230e..5e2209f171f5d12157a61c4c2acaeca4b85aed91 100644 (file)
@@ -113,7 +113,13 @@ vtkImageData * UnMosaic::unMosaic(vtkImageData *imageIn, int nbImagesPerRow, int
    int outputdims[3];
    imageIn->GetDimensions (inputdims);
    unsigned short *input = (unsigned short *)(imageIn->GetScalarPointer());
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    imageIn->Update();
+#else
+       // .. 
+#endif
      
    unsigned int div = (unsigned int)ceil(sqrt( (double)numberOfImagesInMosaic ) );
    outputdims[0] = inputdims[0] / div;
@@ -124,12 +130,21 @@ vtkImageData * UnMosaic::unMosaic(vtkImageData *imageIn, int nbImagesPerRow, int
     vtkImageOut = vtkImageData::New();
     vtkImageOut->SetDimensions( outputdims );
     vtkImageOut->SetExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
-    vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+   vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
     vtkImageOut->SetNumberOfScalarComponents(1);
 //vtkImageOut->SetSpacing( blabla );
     vtkImageOut->SetScalarType( VTK_UNSIGNED_SHORT );
     vtkImageOut->AllocateScalars();
     vtkImageOut->Update();
+#else
+    vtkImageOut->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+#endif
+
+
+
     
     unsigned short *output =(unsigned short *)(vtkImageOut->GetScalarPointer());
 
index 706949fe06a2c00025ac4e0ea0d301489264561e..f2db9539af4e23a644e65c950ec29cb576086d68 100644 (file)
@@ -54,7 +54,12 @@ void UnaryOperations::Process()
                return;
        }
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        ope->SetInput1((vtkDataObject*)bbGetInputIn1());
+#else
+       ope->SetInput1Data((vtkDataObject*)bbGetInputIn1());
+#endif
 
 
        switch (bbGetInputOperation())
index 33af404643cc8de4484d5722c58b5136f4856e9e..689b9b14f3def9440e59e2c00ec08c8ad13a43a1 100644 (file)
@@ -82,7 +82,15 @@ BBTK_BLACK_BOX_IMPLEMENTATION(VecImageGaussianSmooth,bbtk::AtomicBlackBox);
                for (i=0 ;  i<size ; i++)
                {       
                        vtkimagegaussiansmooth = vtkImageGaussianSmooth::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        vtkimagegaussiansmooth->SetInput( bbGetInputIn()[i] );
+#else
+                       vtkimagegaussiansmooth->SetInputData( bbGetInputIn()[i] );
+#endif
+
                        vtkimagegaussiansmooth->SetStandardDeviation( stdvX,stdvY, stdvZ ); 
                        vtkimagegaussiansmooth->Modified();
                        vtkimagegaussiansmooth->Update();
index b3b39fbd2fc72630bb4667f57211990413e4ef0e..2e25383433759e0d7950c4ef2e0051f0f9cc4f9c 100644 (file)
@@ -134,7 +134,13 @@ BBTK_BLACK_BOX_IMPLEMENTATION(VecIsoSurfaceExtractor,bbtk::AtomicBlackBox);
                        polydatamapper = vtkPolyDataMapper::New();
                        vtkactor       = vtkActor::New();
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        polydatamapper->SetInput(marchingcubes->GetOutput());
+#else
+                       polydatamapper->SetInputData(marchingcubes->GetOutput());
+#endif
+
                        vtkactor->SetMapper(polydatamapper);
 
                        polydatamapper->ScalarVisibilityOff();
@@ -150,7 +156,13 @@ BBTK_BLACK_BOX_IMPLEMENTATION(VecIsoSurfaceExtractor,bbtk::AtomicBlackBox);
                        marchingcubes=VecMarchingcubes[i];
                        vtkactor=(vtkActor*)VecVtkactor[i];
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        marchingcubes->SetInput( bbGetInputIn()[i] );
+#else
+                       marchingcubes->SetInputData( bbGetInputIn()[i] );
+#endif
+
                        marchingcubes->SetValue(0, bbGetInputIsovalue() );
                        marchingcubes->Update();
                         
index a804e1507099a2645db27d23fbc40d8e3ff8e59f..3c5b371acb3201e38410c32f21f3ef05548c167a 100644 (file)
@@ -59,7 +59,12 @@ namespace bbvtk
 
    void VolumeRenderer::bbUserSetDefaultValues() 
    { 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
           mRayCastFunction = NULL;
+#else
+       //
+#endif
           mMapper                      = NULL;
           mVolume                      = NULL;
           bbSetInputColorFunction(0);
@@ -78,11 +83,16 @@ namespace bbvtk
     //    mMIP = vtkVolumeRayCastMIPFunction::New();
     //    mMIP->SetMaximizeMethodToScalarValue();
 
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7) 
     mRayCastFunction = vtkVolumeRayCastCompositeFunction::New();
     mMapper = vtkVolumeRayCastMapper::New();
           mMapper->SetVolumeRayCastFunction(mRayCastFunction);
           mMapper->AutoAdjustSampleDistancesOn();
-
+#else 
+         mMapper = vtkFixedPointVolumeRayCastMapper::New();
+#endif
+                  
           _volumeProperty = vtkVolumeProperty::New();  
        _volumeProperty->SetInterpolationTypeToLinear();
        _volumeProperty->ShadeOn();
@@ -102,11 +112,16 @@ namespace bbvtk
        //---------------------------------------------------------------------
    void VolumeRenderer::bbUserFinalizeProcessing() 
    { 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
           if (mRayCastFunction!=NULL)
           {
                   mRayCastFunction->Delete();
                   mRayCastFunction=NULL;
           }      
+#else
+       //
+#endif
           if (mMapper!=NULL)
           {
                   mMapper->Delete();
@@ -126,7 +141,13 @@ void VolumeRenderer::Process()
     bool changed = false;
     if ( bbGetInputStatus("In") != bbtk::UPTODATE )
        {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                mMapper->SetInput( bbGetInputIn() );
+#else
+               mMapper->SetInputData( bbGetInputIn() );
+#endif
                changed = true;
     }
 
index d18b8aa25154f8bcdea8130181073a66bd41df98..fc500f17181b33f508ca847d68db5e2ad3810797 100644 (file)
 //#include <vtkImageShiftScale.h>
 //#include <vtkVolumeRayCastMIPFunction.h>
 #include "vtkVolumeProperty.h"
-#include "vtkVolumeRayCastCompositeFunction.h"
-#include "vtkVolumeRayCastMapper.h"
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include "vtkVolumeRayCastCompositeFunction.h"
+       #include "vtkVolumeRayCastMapper.h"
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
 #include "vtkProp3D.h"
 #include "vtkVolume.h"
 
@@ -95,8 +100,13 @@ namespace bbvtk
 
   private:
     vtkVolumeProperty                 *mVolumeProperty;
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7) 
     vtkVolumeRayCastCompositeFunction *mRayCastFunction;
     vtkVolumeRayCastMapper            *mMapper;
+#else 
+    vtkFixedPointVolumeRayCastMapper  *mMapper;
+#endif
     vtkVolume                         *mVolume;
     vtkVolumeProperty                 *_volumeProperty;
   };
index 4757485e021b57407f02fbbbf0b32b1fef04b41b..c216cdd5c60d641b86a9b107f2fc83fbfd8dadb6 100644 (file)
@@ -80,11 +80,21 @@ namespace bbwx
     long style;
     if (bbGetInputOpenSave()=="Save") 
       {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        style = wxSAVE | wxOVERWRITE_PROMPT;
-      }
-    else 
-      {
+#else
+       style = wxFD_SAVE | wxFD_OVERWRITE_PROMPT;
+#endif
+      }  else  {
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        style = wxOPEN | wxFILE_MUST_EXIST;
+#else
+       style = wxFD_OPEN | wxFD_FILE_MUST_EXIST;
+#endif
+
       }
     
     std::string wc(bbGetInputWildcard());
diff --git a/packages/wxvtk/bbs/appli/exampleDoubleSlicer.bbg b/packages/wxvtk/bbs/appli/exampleDoubleSlicer.bbg
new file mode 100644 (file)
index 0000000..8f0aa7f
--- /dev/null
@@ -0,0 +1,179 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleDoubleSlicer.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#exampleDoubleSlicer'>exampleDoubleSlicer.bbs</a>.
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:DoubleSlicer
+PACKAGENAME:wxvtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+Widget
+114.692614:-148.835476:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:11
+COMPLEX_PORT
+In1
+113.645640:101.221236:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+In2
+-23.203486:97.557528:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinDialog
+175.787320:91.451347:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinTitle
+226.397938:91.451347:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinWidth
+252.583834:92.672583:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinHeight
+200.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Orientation
+-99.503468:98.965966:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+RefreshSlicer1
+86.989011:98.965966:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+RefreshSlicer2
+10.496359:92.061965:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+BoxProcessModeSlicer1
+101.407769:98.778764:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+BoxProcessModeSlicer2
+-58.644844:96.336292:-900.000000
+FIN_COMPLEX_PORT
+BOXES:7
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+90.617386:-106.093473:-900.000000
+129.697386:-116.093473:-900.000000
+PORT
+Proportion:"80"
+FIN_BOX
+BOX
+wx:LayoutLine:slicers
+ISEXEC:FALSE
+5.679546:-77.487776:-900.000000
+63.239546:-87.487776:-900.000000
+PORT
+Orientation:"HORIZONTAL"
+FIN_BOX
+BOX
+wxvtk:Viewer2D:slicer1
+ISEXEC:FALSE
+80.764708:-7.676600:-900.000000
+119.844708:-17.676600:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:slicer2
+ISEXEC:FALSE
+-18.360331:-0.894079:-900.000000
+20.719669:-10.894079:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+33.020789:74.281715:-900.000000
+84.420789:64.281715:-900.000000
+PORT
+Title:"Slice"
+FIN_BOX
+BOX
+std:MultipleInputs:refresh1
+ISEXEC:FALSE
+56.039503:38.668844:-900.000000
+97.539503:28.668844:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:refresh2
+ISEXEC:FALSE
+-5.624910:34.913382:-900.000000
+35.875090:24.913382:-900.000000
+FIN_BOX
+CONNECTIONS:22
+CONNECTION
+slicers:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+slicer1:Widget:slicers:Widget1
+NumberOfControlPoints:0
+CONNECTION
+slicer2:Widget:slicers:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:slicer1:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:slicer2:Slice
+NumberOfControlPoints:0
+CONNECTION
+refresh1:Out:slicer1:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+refresh2:Out:slicer2:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:refresh2:In1
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:refresh1:In1
+NumberOfControlPoints:0
+CONNECTION
+In1:In1:slicer1:In
+NumberOfControlPoints:0
+CONNECTION
+In2:In2:slicer2:In
+NumberOfControlPoints:0
+CONNECTION
+WinDialog:WinDialog:main:WinDialog
+NumberOfControlPoints:0
+CONNECTION
+WinTitle:WinTitle:main:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+WinWidth:WinWidth:main:WinWidth
+NumberOfControlPoints:0
+CONNECTION
+WinHeight:WinHeight:main:WinHeight
+NumberOfControlPoints:0
+CONNECTION
+Orientation:Orientation:slicers:Orientation
+NumberOfControlPoints:0
+CONNECTION
+RefreshSlicer1:RefreshSlicer1:refresh1:In2
+NumberOfControlPoints:0
+CONNECTION
+RefreshSlicer2:RefreshSlicer2:refresh2:In2
+NumberOfControlPoints:0
+CONNECTION
+BoxProcessModeSlicer1:BoxProcessModeSlicer1:slicer1:BoxProcessMode
+NumberOfControlPoints:0
+CONNECTION
+BoxProcessModeSlicer2:BoxProcessModeSlicer2:slicer2:BoxProcessMode
+NumberOfControlPoints:0
+CONNECTION
+main:Widget:Widget:Widget
+NumberOfControlPoints:0
+APP_END
index f16bdd922bc7ee22511da21ff227a125d7d87540..f794ae86fea63aae4414d27fb083fa5401fd526b 100644 (file)
@@ -1,48 +1,66 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
-
-description "Demo of the box <a href=#DoubleSlicer>DoubleSlicer</a>."
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleDoubleSlicer.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include wx
+include wxvtk
+include std
+
+define DoubleSlicer wxvtk
+
 author "laurent.guigues at creatis.insa-lyon.fr"
-category "example"     
+description "Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#exampleDoubleSlicer'>exampleDoubleSlicer.bbs</a>."
+
+category "<VOID>"
+
+new wx:LayoutSplit main
+  set main.Proportion "80"
+
+new wx:LayoutLine slicers
+  set slicers.Orientation "HORIZONTAL"
+
+new wxvtk:Viewer2D slicer1
+
+new wxvtk:Viewer2D slicer2
+
+new wx:Slider slider
+  set slider.Title "Slice"
+
+new std:MultipleInputs refresh1
+
+new std:MultipleInputs refresh2
 
-include vtk/boxes/bbLoadHola
-include wxvtk/boxes/bbDoubleSlicer
 
-new LoadHola reader1
-new LoadHola reader2
-new DoubleSlicer viewer 
+connect slicers.Widget main.Widget1
+connect slicer1.Widget slicers.Widget1
+connect slicer2.Widget slicers.Widget2
+connect slider.Widget main.Widget2
+connect slider.Out slicer1.Slice
+connect slider.Out slicer2.Slice
+connect refresh1.Out slicer1.BoxExecute
+connect refresh2.Out slicer2.BoxExecute
+connect slider.BoxChange refresh2.In1
+connect slider.BoxChange refresh1.In1
 
-connect reader1.Out viewer.In1
-connect reader2.Out viewer.In2
+# Complex input ports
+input In1 slicer1.In " "
+input In2 slicer2.In " "
+input WinDialog main.WinDialog " "
+input WinTitle main.WinTitle " "
+input WinWidth main.WinWidth " "
+input WinHeight main.WinHeight " "
+input Orientation slicers.Orientation " "
+input RefreshSlicer1 refresh1.In2 " "
+input RefreshSlicer2 refresh2.In2 " "
+input BoxProcessModeSlicer1 slicer1.BoxProcessMode " "
+input BoxProcessModeSlicer2 slicer2.BoxProcessMode " "
 
-load std 
-set viewer.WinTitle "ExampleDoubleSlicer" 
-set viewer.WinWidth 600 
-set viewer.WinHeight 400 
-set viewer.Orientation 0 
+# Complex output ports
+output Widget main.Widget " "
 
-exec viewer 
+exec main
 
+endefine
diff --git a/packages/wxvtk/bbs/appli/exampleImagePlanes.bbg b/packages/wxvtk/bbs/appli/exampleImagePlanes.bbg
new file mode 100644 (file)
index 0000000..d9ce4a4
--- /dev/null
@@ -0,0 +1,50 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleImagePlanes.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of the box vtk::ImagePlanes.
+AUTHOR:laurent.guigues@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:3
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+36.250000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:ImagePlanes:planes
+ISEXEC:FALSE
+-2.010756:46.011610:-900.000000
+37.614244:36.011610:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:TRUE
+0.000000:10.000000:-900.000000
+63.720000:0.000000:-900.000000
+PORT
+WinHeight:"400"
+PORT
+WinTitle:"ExampleImagePlanes"
+PORT
+WinWidth:"350"
+FIN_BOX
+CONNECTIONS:4
+CONNECTION
+reader:Out:planes:In
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneX:viewer:Obs1
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneY:viewer:Obs2
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneZ:viewer:Obs3
+NumberOfControlPoints:0
+APP_END
index 565a7c3f9114632e6db8cf59b889a48356ff805c..1a0d2fe3aa3acbb5c8c737a278077f180445e9d9 100644 (file)
@@ -1,50 +1,39 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleImagePlanes.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
 
-description "Example of the box vtk::ImagePlanes."
 author "laurent.guigues@creatis.insa-lyon.fr"
+description "Example of the box vtk::ImagePlanes."
 category "example"
 
-include vtk/boxes/bbLoadHola
-load vtk
-load wxvtk
+new vtk:LoadHola reader
+
+new vtk:ImagePlanes planes
+
+new wxvtk:Viewer3D viewer
+  set viewer.WinHeight "400"
+  set viewer.WinTitle "ExampleImagePlanes"
+  set viewer.WinWidth "350"
+
 
-new LoadHola reader
-new ImagePlanes planes
-new Viewer3D viewer
 connect reader.Out planes.In
+
 connect planes.PlaneX viewer.Obs1
+
 connect planes.PlaneY viewer.Obs2
+
 connect planes.PlaneZ viewer.Obs3
 
-load std
-set viewer.WinTitle "ExampleImagePlanes"
-set viewer.WinWidth 350
-set viewer.WinHeight 400
-#set viewer.Slice 20
 
-exec viewer
 
+# Complex input ports
+exec viewer
diff --git a/packages/wxvtk/bbs/appli/exampleIsoSurfaceWidget.bbg b/packages/wxvtk/bbs/appli/exampleIsoSurfaceWidget.bbg
new file mode 100644 (file)
index 0000000..24e61fd
--- /dev/null
@@ -0,0 +1,107 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/appli/bbs/appli/exampleIsoSurfaceWidget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of IsoSurfaceWidget.
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:7
+BOX
+wxvtk:IsoSurfaceWidget:surface1
+ISEXEC:FALSE
+-17.763434:48.350814:-900.000000
+27.861566:38.350814:-900.000000
+PORT
+Colour:"0.5 0 0"
+PORT
+Isovalue:"100"
+PORT
+Opacity:"100"
+PORT
+Title:"Iso-surface 1"
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface2
+ISEXEC:FALSE
+-76.685492:44.440859:-900.000000
+-31.060492:34.440859:-900.000000
+PORT
+Isovalue:"200"
+PORT
+Opacity:"20"
+PORT
+Title:"Iso-surface 2"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-71.608845:-32.743264:-900.000000
+-7.888845:-42.743264:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:reader1
+ISEXEC:FALSE
+-8.962398:102.678719:-900.000000
+28.412602:92.678719:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:refresh
+ISEXEC:FALSE
+-28.865581:0.514767:-900.000000
+11.509419:-9.485233:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:main
+ISEXEC:TRUE
+-31.022958:-128.884139:-900.000000
+26.537042:-138.884139:-900.000000
+PORT
+WinHeight:"800"
+PORT
+WinWidth:"800"
+FIN_BOX
+BOX
+wx:LayoutLine:controls
+ISEXEC:FALSE
+64.947557:-18.962398:-900.000000
+122.507557:-28.962398:-900.000000
+FIN_BOX
+CONNECTIONS:11
+CONNECTION
+reader1:Out:surface1:In
+NumberOfControlPoints:0
+CONNECTION
+reader1:Out:surface2:In
+NumberOfControlPoints:0
+CONNECTION
+surface1:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+surface2:Out:viewer:In2
+NumberOfControlPoints:0
+CONNECTION
+surface1:BoxChange:refresh:In1
+NumberOfControlPoints:0
+CONNECTION
+surface2:BoxChange:refresh:In2
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+controls:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+surface1:Widget:controls:Widget1
+NumberOfControlPoints:0
+CONNECTION
+surface2:Widget:controls:Widget2
+NumberOfControlPoints:0
+CONNECTION
+refresh:Out:viewer:BoxExecute
+NumberOfControlPoints:0
+APP_END
index 6b2714134b6738529db85fd39690f8147c35db12..64fb87102be995d7aa98f129b28bf7812a954b0b 100644 (file)
@@ -1,76 +1,69 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/appli/bbs/appli/exampleIsoSurfaceWidget.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include wxvtk
+include vtk
+include std
+include wx
 
-description "Example of IsoSurfaceWidget."
 author "laurent.guigues at creatis.insa-lyon.fr"
+description "Example of IsoSurfaceWidget."
 category "example"
 
-include wxvtk
+new wxvtk:IsoSurfaceWidget surface1
+  set surface1.Colour "0.5 0 0"
+  set surface1.Isovalue "100"
+  set surface1.Opacity "100"
+  set surface1.Title "Iso-surface 1"
 
-include wxvtk/boxes/bbIsoSurfaceWidget
-include vtk/boxes/bbLoadHola
-new IsoSurfaceWidget surface1
-new IsoSurfaceWidget surface2
+new wxvtk:IsoSurfaceWidget surface2
+  set surface2.Isovalue "200"
+  set surface2.Opacity "20"
+  set surface2.Title "Iso-surface 2"
 
-//load wxvtk
-new Viewer3D viewer
-new LoadHola reader1
+new wxvtk:Viewer3D viewer
 
-connect reader1.Out surface1.In
-connect reader1.Out surface2.In
+new vtk:LoadHola reader1
+
+new std:MultipleInputs refresh
+
+new wx:LayoutLine main
+  set main.WinHeight "800"
+  set main.WinWidth "800"
 
-set surface1.Isovalue 100
-set surface1.Opacity 100
-set surface1.Colour "0.5 0 0"
-set surface1.Title "Iso-surface 1"
+new wx:LayoutLine controls
 
-set surface2.Isovalue 200
-set surface2.Opacity 20
-set surface2.Title "Iso-surface 2"
 
+connect reader1.Out surface1.In
+
+connect reader1.Out surface2.In
 
 connect surface1.Out viewer.In1
+
 connect surface2.Out viewer.In2
-new MultipleInputs refresh
+
 connect surface1.BoxChange refresh.In1
+
 connect surface2.BoxChange refresh.In2
 
-new LayoutLine main
-new LayoutLine controls
 connect viewer.Widget main.Widget1
-connect controls.Widget main.Widget2 
-connect surface1.Widget controls.Widget1 
-connect surface2.Widget controls.Widget2
 
-set main.WinWidth 800
-set main.WinHeight  800
+connect controls.Widget main.Widget2
 
-exec main
+connect surface1.Widget controls.Widget1
+
+connect surface2.Widget controls.Widget2
 
-# BUG in pipeline update : have to plug forced execution of viewer 
-# after creation of all windows
 connect refresh.Out viewer.BoxExecute
+
+
+
+# Complex input ports
+exec main
diff --git a/packages/wxvtk/bbs/appli/exampleMIPWidget.bbg b/packages/wxvtk/bbs/appli/exampleMIPWidget.bbg
new file mode 100644 (file)
index 0000000..26ac4b1
--- /dev/null
@@ -0,0 +1,57 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleMIPWidget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of MIPWidget.
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:4
+BOX
+wxvtk:MIPWidget:MIP
+ISEXEC:FALSE
+2.104064:58.878521:-900.000000
+36.379064:48.878521:-900.000000
+PORT
+Title:"MIP Controls"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-72.647174:20.161687:-900.000000
+-8.927174:10.161687:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+-32.763275:78.532355:-900.000000
+3.486725:68.532355:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:main
+ISEXEC:TRUE
+-34.172870:-23.907547:-900.000000
+23.387130:-33.907547:-900.000000
+PORT
+WinTitle:"ExampleMIPWidget"
+FIN_BOX
+CONNECTIONS:5
+CONNECTION
+reader:Out:MIP:In
+NumberOfControlPoints:0
+CONNECTION
+MIP:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+MIP:BoxChange:viewer:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+MIP:Widget:main:Widget2
+NumberOfControlPoints:0
+APP_END
index 10c4c05902dceae9f2b74d3a99044169e0cdca29..39dcc461411c906700f9f630000fba2e20b6b8c1 100644 (file)
@@ -1,54 +1,43 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleMIPWidget.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include wxvtk
+include vtk
+include wx
 
-description "Example of MIPWidget."
 author "laurent.guigues at creatis.insa-lyon.fr"
+description "Example of MIPWidget."
 category "example"
 
-include wxvtk/boxes/bbMIPWidget
-include vtk/boxes/bbLoadHola
-new MIPWidget MIP
+new wxvtk:MIPWidget MIP
+  set MIP.Title "MIP Controls"
+
+new wxvtk:Viewer3D viewer
+
+new vtk:LoadHola reader
+
+new wx:LayoutLine main
+  set main.WinTitle "ExampleMIPWidget"
 
-load wxvtk
-new Viewer3D viewer
-new LoadHola reader
 
 connect reader.Out MIP.In
+
 connect MIP.Out viewer.In1
+
 connect MIP.BoxChange viewer.BoxExecute
 
-new LayoutLine main
 connect viewer.Widget main.Widget1
-connect MIP.Widget main.Widget2 
 
-set MIP.Shift 300
-set MIP.Scale 200
-#set MIP.Colour "0.5 0 0"
-set MIP.Title "MIP Controls"
+connect MIP.Widget main.Widget2
+
+
 
-set main.WinTitle "ExampleMIPWidget"
+# Complex input ports
 exec main
diff --git a/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicer.bbg b/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicer.bbg
new file mode 100644 (file)
index 0000000..3ecd66e
--- /dev/null
@@ -0,0 +1,144 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicer.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:tool image viewer
+DESCRIPTION:elementary image synchronization tool
+AUTHOR:info-dev at creatis.Insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:12
+BOX
+creaImageIO:ImagesChooserDialogBox:chooser1
+ISEXEC:FALSE
+34.805229:92.592868:-900.000000
+89.430229:82.592868:-900.000000
+FIN_BOX
+BOX
+vtk:ConcatImages:reader1
+ISEXEC:FALSE
+46.468061:65.212081:-900.000000
+89.068061:55.212081:-900.000000
+FIN_BOX
+BOX
+creaImageIO:ImagesChooserDialogBox:chooser2
+ISEXEC:FALSE
+-91.028897:89.210524:-900.000000
+-36.403897:79.210524:-900.000000
+FIN_BOX
+BOX
+vtk:ConcatImages:reader2
+ISEXEC:FALSE
+-101.880062:-4.332819:-900.000000
+-59.280062:-14.332819:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:viewer1
+ISEXEC:FALSE
+32.876971:-62.895296:-900.000000
+96.596971:-72.895296:-900.000000
+PORT
+nTypeView:"0"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:viewer2
+ISEXEC:FALSE
+-100.594549:-63.561510:-900.000000
+-36.874549:-73.561510:-900.000000
+PORT
+nTypeView:"0"
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+-19.017545:-28.450304:-900.000000
+32.382455:-38.450304:-900.000000
+PORT
+ReactiveOnTrack:"1"
+PORT
+Title:"Slice number"
+FIN_BOX
+BOX
+wx:LayoutSplit:layout
+ISEXEC:TRUE
+-55.328435:-151.513368:-900.000000
+-16.248435:-161.513368:-900.000000
+PORT
+Proportion:"10"
+FIN_BOX
+BOX
+wx:LayoutLine:layout_line
+ISEXEC:FALSE
+-17.426729:-112.296567:-900.000000
+40.133271:-122.296567:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+itk:ImageProperties:imProperties
+ISEXEC:FALSE
+-17.395966:41.194134:-900.000000
+30.879034:31.194134:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:imSize
+ISEXEC:FALSE
+-35.036257:20.479935:-900.000000
+11.688743:10.479935:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:Add:add
+ISEXEC:FALSE
+-9.017909:-1.097942:-900.000000
+19.607091:-11.097942:-900.000000
+PORT
+In1:"-1"
+FIN_BOX
+CONNECTIONS:14
+CONNECTION
+reader1:Out:viewer1:In
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer1:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+reader2:Out:viewer2:In
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer2:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:layout:Widget1
+NumberOfControlPoints:0
+CONNECTION
+layout_line:Widget:layout:Widget2
+NumberOfControlPoints:0
+CONNECTION
+viewer1:Widget:layout_line:Widget1
+NumberOfControlPoints:0
+CONNECTION
+viewer2:Widget:layout_line:Widget2
+NumberOfControlPoints:0
+CONNECTION
+reader1:Out:imProperties:In
+NumberOfControlPoints:0
+CONNECTION
+imProperties:Size:imSize:In
+NumberOfControlPoints:0
+CONNECTION
+imSize:Out:add:In2
+NumberOfControlPoints:0
+CONNECTION
+add:Out:slider:Max
+NumberOfControlPoints:0
+CONNECTION
+chooser2:OutImages:reader2:In
+NumberOfControlPoints:0
+CONNECTION
+chooser1:OutImages:reader1:In
+NumberOfControlPoints:0
+APP_END
index 117da984a500d7ee2ba50b1b494695bbb3f1b42e..6962a3692275950b8c1f8669cff7fcbef6af9e7c 100644 (file)
@@ -1,86 +1,86 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicer.bbs
+# ----------------------------------
 
-
-
-description "elementary image synchronization tool"
-author "info-dev at creatis.Insa-lyon.fr"
-category  "tool image viewer"
+# BBTK GEditor Script
+# ----------------------
 
 include std
+include itkvtk
+include creaImageIO
 include vtk
+include creaMaracasVisu
 include wx
 include itk
-include wxvtk
-include itkvtk
+include std
+
+author "info-dev at creatis.Insa-lyon.fr"
+description "elementary image synchronization tool"
+category "tool image viewer"
+
+new creaImageIO:ImagesChooserDialogBox chooser1
+
+new vtk:ConcatImages reader1
+
+new creaImageIO:ImagesChooserDialogBox chooser2
+
+new vtk:ConcatImages reader2
+
+new creaMaracasVisu:ViewerNV viewer1
+  set viewer1.nTypeView "0"
 
-load creaImageIO
-load creaMaracasVisu
+new creaMaracasVisu:ViewerNV viewer2
+  set viewer2.nTypeView "0"
 
-new ImagesChooserDialogBox chooser1
-new ConcatImages reader1
-   connect chooser1.Out reader1.In
+new wx:Slider slider
+  set slider.ReactiveOnTrack "1"
+  set slider.Title "Slice number"
 
-new ImagesChooserDialogBox chooser2
-new ConcatImages reader2
-   connect chooser2.Out reader2.In
+new wx:LayoutSplit layout
+  set layout.Proportion "10"
 
-new ViewerNV viewer1
-   set viewer1.nTypeView 0
-new ViewerNV viewer2
-   set viewer2.nTypeView 0
+new wx:LayoutLine layout_line
+  set layout_line.Orientation "H"
 
-# slider is useless, since ViewerNV has no entry 'Slice Number' :-(
-new Slider       slider
-new LayoutSplit layout 
-new LayoutLine layout_line
-new ImageProperties imProperties
-new GetVectorIntElement imSize
-new Add add
+new itk:ImageProperties imProperties
+
+new std:GetVectorIntElement imSize
+  set imSize.I "2"
+
+new std:Add add
+  set add.In1 "-1"
+
+
+connect reader1.Out viewer1.In
 
-connect reader1.Out      viewer1.In
 connect slider.BoxChange viewer1.BoxExecute
 
-connect reader2.Out       viewer2.In
+connect reader2.Out viewer2.In
+
 connect slider.BoxChange viewer2.BoxExecute
 
 connect slider.Widget layout.Widget1
+
 connect layout_line.Widget layout.Widget2
+
 connect viewer1.Widget layout_line.Widget1
+
 connect viewer2.Widget layout_line.Widget2
+
 connect reader1.Out imProperties.In
+
 connect imProperties.Size imSize.In
+
 connect imSize.Out add.In2
+
 connect add.Out slider.Max
 
-set slider.Title "Slice number"
-set slider.ReactiveOnTrack 1
-set layout.Proportion 10
-set layout_line.Orientation H
+connect chooser2.OutImages reader2.In
+
+connect chooser1.OutImages reader1.In
+
 
-set imSize.I 2
-set add.In1 -1
 
+# Complex input ports
 exec layout
diff --git a/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbg b/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbg
new file mode 100644 (file)
index 0000000..03712e4
--- /dev/null
@@ -0,0 +1,154 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:application image viewer
+DESCRIPTION:elementary 3D image synchronization tool
+AUTHOR:maciej.orkisz at creatis.Insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:12
+BOX
+wx:FileSelector:fileDialog1
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+37.375000:60.000000:-900.000000
+PORT
+DefaultDir:"."
+PORT
+Message:"Select the first (left) MHD image file"
+FIN_BOX
+BOX
+vtk:MetaImageReader:reader1
+ISEXEC:FALSE
+2.407568:40.470839:-900.000000
+48.907568:30.470839:-900.000000
+FIN_BOX
+BOX
+wx:FileSelector:fileDialog2
+ISEXEC:FALSE
+-68.507131:64.617369:-900.000000
+-26.757131:54.617369:-900.000000
+PORT
+DefaultDir:"."
+PORT
+Message:"Select the second (right) MHD image file"
+FIN_BOX
+BOX
+vtk:MetaImageReader:reader2
+ISEXEC:FALSE
+-71.607188:38.192114:-900.000000
+-25.107188:28.192114:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer1
+ISEXEC:FALSE
+29.269295:-74.222865:-900.000000
+68.349295:-84.222865:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer2
+ISEXEC:FALSE
+-77.795707:-75.458213:-900.000000
+-38.715707:-85.458213:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+9.033110:-36.675368:-900.000000
+60.433110:-46.675368:-900.000000
+PORT
+ReactiveOnTrack:"1"
+PORT
+Title:"Slice number"
+FIN_BOX
+BOX
+wx:LayoutSplit:layout
+ISEXEC:TRUE
+-43.782767:-167.503045:-900.000000
+-4.702767:-177.503045:-900.000000
+PORT
+Proportion:"10"
+FIN_BOX
+BOX
+wx:LayoutLine:layout_line
+ISEXEC:FALSE
+-94.368246:-112.268838:-900.000000
+-36.808246:-122.268838:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+itk:ImageProperties:imProperties
+ISEXEC:FALSE
+22.779648:22.396181:-900.000000
+71.054648:12.396181:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:imSize
+ISEXEC:FALSE
+29.521617:3.296470:-900.000000
+76.246617:-6.703530:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:Add:add
+ISEXEC:FALSE
+24.504482:-12.520390:-900.000000
+53.129482:-22.520390:-900.000000
+PORT
+In1:"-1"
+FIN_BOX
+CONNECTIONS:16
+CONNECTION
+fileDialog1:Out:reader1:In
+NumberOfControlPoints:0
+CONNECTION
+reader1:Out:viewer1:In
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:viewer1:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer1:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+fileDialog2:Out:reader2:In
+NumberOfControlPoints:0
+CONNECTION
+reader2:Out:viewer2:In
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:viewer2:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer2:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:layout:Widget1
+NumberOfControlPoints:0
+CONNECTION
+layout_line:Widget:layout:Widget2
+NumberOfControlPoints:0
+CONNECTION
+viewer1:Widget:layout_line:Widget1
+NumberOfControlPoints:0
+CONNECTION
+viewer2:Widget:layout_line:Widget2
+NumberOfControlPoints:0
+CONNECTION
+reader1:Out:imProperties:In
+NumberOfControlPoints:0
+CONNECTION
+imProperties:Size:imSize:In
+NumberOfControlPoints:0
+CONNECTION
+imSize:Out:add:In2
+NumberOfControlPoints:0
+CONNECTION
+add:Out:slider:Max
+NumberOfControlPoints:0
+APP_END
index 2b1c5970ca0bd34b6648598c2ecdc24c61761467..412175a46ad87f8329c492257a564677d8f81c34 100644 (file)
@@ -1,87 +1,91 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
-
-# my_MHD_slicer.bbs
-description "elementary 3D image synchronization tool"
-author "maciej.orkisz at creatis.Insa-lyon.fr"
-#category "example"
-category  "application image viewer"
-#category "image"
-#category "viewer"
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
 
 include std
-include vtk
+include itkvtk
 include wx
-include itk
+include vtk
 include wxvtk
-include itkvtk
+include itk
+include std
+
+author "maciej.orkisz at creatis.Insa-lyon.fr"
+description "elementary 3D image synchronization tool"
+category "application image viewer"
+
+new wx:FileSelector fileDialog1
+  set fileDialog1.DefaultDir "."
+  set fileDialog1.Message "Select the first (left) MHD image file"
+
+new vtk:MetaImageReader reader1
+
+new wx:FileSelector fileDialog2
+  set fileDialog2.DefaultDir "."
+  set fileDialog2.Message "Select the second (right) MHD image file"
+
+new vtk:MetaImageReader reader2
+
+new wxvtk:Viewer2D viewer1
+
+new wxvtk:Viewer2D viewer2
+
+new wx:Slider slider
+  set slider.ReactiveOnTrack "1"
+  set slider.Title "Slice number"
+
+new wx:LayoutSplit layout
+  set layout.Proportion "10"
+
+new wx:LayoutLine layout_line
+  set layout_line.Orientation "H"
+
+new itk:ImageProperties imProperties
+
+new std:GetVectorIntElement imSize
+  set imSize.I "2"
+
+new std:Add add
+  set add.In1 "-1"
+
+
+connect fileDialog1.Out reader1.In
+
+connect reader1.Out viewer1.In
+
+connect slider.Out viewer1.Slice
 
-new FileSelector fileDialog1
-new MetaImageReader reader1
-new FileSelector fileDialog2
-new MetaImageReader reader2
-new Viewer2D     viewer1
-new Viewer2D     viewer2
-new Slider       slider
-new LayoutSplit layout 
-new LayoutLine layout_line
-new ImageProperties imProperties
-new GetVectorIntElement imSize
-new Add add
-
-connect fileDialog1.Out   reader1.In 
-connect reader1.Out       viewer1.In
-connect slider.Out       viewer1.Slice
 connect slider.BoxChange viewer1.BoxExecute
 
-connect fileDialog2.Out   reader2.In 
-connect reader2.Out       viewer2.In
-connect slider.Out       viewer2.Slice
+connect fileDialog2.Out reader2.In
+
+connect reader2.Out viewer2.In
+
+connect slider.Out viewer2.Slice
+
 connect slider.BoxChange viewer2.BoxExecute
 
 connect slider.Widget layout.Widget1
+
 connect layout_line.Widget layout.Widget2
+
 connect viewer1.Widget layout_line.Widget1
+
 connect viewer2.Widget layout_line.Widget2
+
 connect reader1.Out imProperties.In
+
 connect imProperties.Size imSize.In
+
 connect imSize.Out add.In2
+
 connect add.Out slider.Max
 
-set fileDialog1.Message "Select the first (left) MHD image file"
-set fileDialog2.Message "Select the second (right) MHD image file"
-set slider.Title "Slice number"
-set slider.ReactiveOnTrack 1
-set layout.Proportion 10
-set layout_line.Orientation H
 
-set fileDialog1.DefaultDir "."
-set fileDialog2.DefaultDir "."
-set imSize.I 2
-set add.In1 -1
 
+# Complex input ports
 exec layout
diff --git a/packages/wxvtk/bbs/appli/exampleView2D3D.bbg b/packages/wxvtk/bbs/appli/exampleView2D3D.bbg
new file mode 100644 (file)
index 0000000..6fa5275
--- /dev/null
@@ -0,0 +1,82 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView2D3D.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:6
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+35.550000:60.000000:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+30.657931:45.414653:-900.000000
+82.057931:35.414653:-900.000000
+PORT
+In:"20"
+FIN_BOX
+BOX
+wxvtk:Viewer2D:v2d
+ISEXEC:FALSE
+31.546239:3.408249:-900.000000
+70.626239:-6.591751:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:v3d
+ISEXEC:FALSE
+-79.518486:-19.529161:-900.000000
+-15.798486:-29.529161:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:layout
+ISEXEC:TRUE
+-7.062591:-52.589617:-900.000000
+50.497409:-62.589617:-900.000000
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface
+ISEXEC:FALSE
+-76.222611:12.755360:-900.000000
+-31.722611:2.755360:-900.000000
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+reader:Out:v2d:In
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:v2d:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:layout:Widget1
+NumberOfControlPoints:0
+CONNECTION
+v2d:Widget:layout:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:v2d:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:surface:In
+NumberOfControlPoints:0
+CONNECTION
+surface:Out:v3d:In1
+NumberOfControlPoints:0
+CONNECTION
+surface:Widget:layout:Widget3
+NumberOfControlPoints:0
+CONNECTION
+v3d:Widget:layout:Widget4
+NumberOfControlPoints:0
+CONNECTION
+surface:BoxChange:v3d:BoxExecute
+NumberOfControlPoints:0
+APP_END
index 05dfb4c99d6437dcf6b01dd7d4b32d5f28036c3f..3f58e14d651be84fcf9aa5fe0c15b64b5c762376 100644 (file)
@@ -1,50 +1,56 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
-
-load wx
-include wxvtk
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView2D3D.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
 include vtk
+include wx
+include wxvtk
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:LoadHola reader
+
+new wx:Slider slider
+  set slider.In "20"
+
+new wxvtk:Viewer2D v2d
+
+new wxvtk:Viewer3D v3d
+
+new wx:LayoutTab layout
+
+new wxvtk:IsoSurfaceWidget surface
 
-new LoadHola reader
-new Slider slider
-new Viewer2D v2d
-new Viewer3D v3d
-new LayoutTab layout
 
-set slider.In 20
 connect reader.Out v2d.In
+
 connect slider.Out v2d.Slice
+
 connect slider.Widget layout.Widget1
+
 connect v2d.Widget layout.Widget2
+
 connect slider.BoxChange v2d.BoxExecute
-new IsoSurfaceWidget surface
+
 connect reader.Out surface.In
+
 connect surface.Out v3d.In1
+
 connect surface.Widget layout.Widget3
+
 connect v3d.Widget layout.Widget4
+
 connect surface.BoxChange v3d.BoxExecute
 
+
+
+# Complex input ports
 exec layout
diff --git a/packages/wxvtk/bbs/appli/exampleView3DImage1.bbg b/packages/wxvtk/bbs/appli/exampleView3DImage1.bbg
new file mode 100644 (file)
index 0000000..45442bd
--- /dev/null
@@ -0,0 +1,96 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView3DImage1.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:6
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+-35.783794:49.518486:-900.000000
+0.466206:39.518486:-900.000000
+FIN_BOX
+BOX
+vtk:ImagePlanes:planes
+ISEXEC:FALSE
+-67.747502:16.928870:-900.000000
+-28.122502:6.928870:-900.000000
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface
+ISEXEC:FALSE
+-15.302280:20.593886:-900.000000
+29.197720:10.593886:-900.000000
+PORT
+Colour:"1.0 0.31 0.31"
+PORT
+Isovalue:"100"
+PORT
+Opacity:"100"
+PORT
+Title:"Iso-surface"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-71.985056:-11.524891:-900.000000
+-8.265056:-21.524891:-900.000000
+PORT
+Stereo:"FALSE"
+PORT
+WinHeight:"400"
+PORT
+WinTitle:"ExampleView3DImage1"
+PORT
+WinWidth:"350"
+FIN_BOX
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+-26.602426:-49.058321:-900.000000
+12.477574:-59.058321:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:controls
+ISEXEC:FALSE
+-1.829987:-12.669967:-900.000000
+55.730013:-22.669967:-900.000000
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+reader:Out:planes:In
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneX:viewer:Obs1
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneY:viewer:Obs2
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneZ:viewer:Obs3
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:surface:In
+NumberOfControlPoints:0
+CONNECTION
+surface:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+surface:BoxChange:viewer:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+controls:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+surface:Widget:controls:Widget1
+NumberOfControlPoints:0
+APP_END
index 9fac56df538bb6eabd4a0206ea8443a9ca1e7645..8e14d765229d4694a54af3b4485926fea0041777 100644 (file)
@@ -1,69 +1,63 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView3DImage1.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
+include wx
 
-description "Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>"
 author "laurent.guigues at creatis.insa-lyon.fr"
+description "Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>"
 category "example"
 
-load vtk
-load wxvtk
-include vtk/boxes/bbLoadHola
-include wxvtk/bbs/boxes/bbIsoSurfaceWidget
+new vtk:LoadHola reader
+
+new vtk:ImagePlanes planes
+
+new wxvtk:IsoSurfaceWidget surface
+  set surface.Colour "1.0 0.31 0.31"
+  set surface.Isovalue "100"
+  set surface.Opacity "100"
+  set surface.Title "Iso-surface"
+
+new wxvtk:Viewer3D viewer
+  set viewer.Stereo "FALSE"
+  set viewer.WinHeight "400"
+  set viewer.WinTitle "ExampleView3DImage1"
+  set viewer.WinWidth "350"
+
+new wx:LayoutSplit main
+
+new wx:LayoutLine controls
 
-new LoadHola reader
-new ImagePlanes planes
-new IsoSurfaceWidget surface
-new Viewer3D viewer
 
 connect reader.Out planes.In
+
 connect planes.PlaneX viewer.Obs1
+
 connect planes.PlaneY viewer.Obs2
+
 connect planes.PlaneZ viewer.Obs3
 
 connect reader.Out surface.In
+
 connect surface.Out viewer.In1
+
 connect surface.BoxChange viewer.BoxExecute
 
-new LayoutSplit main
-new LayoutLine controls
 connect viewer.Widget main.Widget1
-connect controls.Widget main.Widget2 
-connect surface.Widget controls.Widget1 
 
-set surface.Isovalue 100
-set surface.Opacity 100
-set surface.Colour "1.0 0.31 0.31"
-set surface.Title "Iso-surface"
+connect controls.Widget main.Widget2
 
-load std
-set viewer.WinTitle "ExampleView3DImage1"
-set viewer.WinWidth 350
-set viewer.WinHeight 400
-set viewer.Stereo FALSE
+connect surface.Widget controls.Widget1
 
 
-exec main
 
+# Complex input ports
+exec main
diff --git a/packages/wxvtk/bbs/appli/exampleView3DImage1_Stereo.bbg b/packages/wxvtk/bbs/appli/exampleView3DImage1_Stereo.bbg
new file mode 100644 (file)
index 0000000..4d6d0f0
--- /dev/null
@@ -0,0 +1,96 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView3DImage1_Stereo.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:6
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+35.550000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:ImagePlanes:planes
+ISEXEC:FALSE
+-70.337118:27.758176:-900.000000
+-30.712118:17.758176:-900.000000
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface
+ISEXEC:FALSE
+-0.470839:28.362736:-900.000000
+44.029161:18.362736:-900.000000
+PORT
+Colour:"1.0 0.31 0.31"
+PORT
+Isovalue:"100"
+PORT
+Opacity:"100"
+PORT
+Title:"Iso-surface"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-62.568268:-7.287336:-900.000000
+1.151732:-17.287336:-900.000000
+PORT
+Stereo:"TRUE"
+PORT
+WinHeight:"400"
+PORT
+WinTitle:"ExampleView3DImage1"
+PORT
+WinWidth:"350"
+FIN_BOX
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+-29.898301:-53.531295:-900.000000
+9.181699:-63.531295:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:controls
+ISEXEC:FALSE
+7.115961:-6.313635:-900.000000
+64.675961:-16.313635:-900.000000
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+reader:Out:planes:In
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneX:viewer:Obs1
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneY:viewer:Obs2
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneZ:viewer:Obs3
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:surface:In
+NumberOfControlPoints:0
+CONNECTION
+surface:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+surface:BoxChange:viewer:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+controls:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+surface:Widget:controls:Widget1
+NumberOfControlPoints:0
+APP_END
index 78787555c82e15d8396643ec0407e2410a82d18a..4dd77ad7271765b447271a46c5546ffd72fb59d9 100644 (file)
@@ -1,69 +1,63 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView3DImage1_Stereo.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
+include wx
 
-description "Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>"
 author "laurent.guigues at creatis.insa-lyon.fr"
+description "Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>"
 category "example"
 
-include vtk/boxes/bbLoadHola
-include wxvtk/boxes/bbIsoSurfaceWidget
-load vtk
-load wxvtk
+new vtk:LoadHola reader
+
+new vtk:ImagePlanes planes
+
+new wxvtk:IsoSurfaceWidget surface
+  set surface.Colour "1.0 0.31 0.31"
+  set surface.Isovalue "100"
+  set surface.Opacity "100"
+  set surface.Title "Iso-surface"
+
+new wxvtk:Viewer3D viewer
+  set viewer.Stereo "TRUE"
+  set viewer.WinHeight "400"
+  set viewer.WinTitle "ExampleView3DImage1"
+  set viewer.WinWidth "350"
+
+new wx:LayoutSplit main
+
+new wx:LayoutLine controls
 
-new LoadHola reader
-new ImagePlanes planes
-new IsoSurfaceWidget surface
-new Viewer3D viewer
 
 connect reader.Out planes.In
+
 connect planes.PlaneX viewer.Obs1
+
 connect planes.PlaneY viewer.Obs2
+
 connect planes.PlaneZ viewer.Obs3
 
 connect reader.Out surface.In
+
 connect surface.Out viewer.In1
+
 connect surface.BoxChange viewer.BoxExecute
 
-new LayoutSplit main
-new LayoutLine controls
 connect viewer.Widget main.Widget1
-connect controls.Widget main.Widget2 
-connect surface.Widget controls.Widget1 
 
-set surface.Isovalue 100
-set surface.Opacity 100
-set surface.Colour "1.0 0.31 0.31"
-set surface.Title "Iso-surface"
+connect controls.Widget main.Widget2
 
-load std
-set viewer.WinTitle "ExampleView3DImage1"
-set viewer.WinWidth 350
-set viewer.WinHeight 400
-set viewer.Stereo TRUE
+connect surface.Widget controls.Widget1
 
 
-exec main
 
+# Complex input ports
+exec main
diff --git a/packages/wxvtk/bbs/appli/exampleViewer2D.bbg b/packages/wxvtk/bbs/appli/exampleViewer2D.bbg
new file mode 100644 (file)
index 0000000..a75099a
--- /dev/null
@@ -0,0 +1,57 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleViewer2D.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of the box <a href=#Viewer2D>Viewer2D</a>.
+AUTHOR:laurent.guigues@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:4
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+-64.740416:33.745367:-900.000000
+-28.490416:23.745367:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer
+ISEXEC:FALSE
+-60.449491:0.214071:-900.000000
+-21.369491:-9.785929:-900.000000
+PORT
+Slice:"20"
+FIN_BOX
+BOX
+wx:Slider:Box02
+ISEXEC:FALSE
+-6.120912:33.429597:-900.000000
+45.279088:23.429597:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box03
+ISEXEC:TRUE
+-30.369141:-30.133721:-900.000000
+8.710859:-40.133721:-900.000000
+PORT
+Proportion:"90"
+FIN_BOX
+CONNECTIONS:5
+CONNECTION
+reader:Out:viewer:In
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:viewer:Slice
+NumberOfControlPoints:0
+CONNECTION
+Box02:BoxChange:viewer:BoxExecute
+NumberOfControlPoints:0
+APP_END
index 74e1087a57d0a6bc75acebd35d8e6e91b5aff28e..2ff41ff45611f318c5b5bf1050b376abb79dd702 100644 (file)
@@ -1,42 +1,43 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleViewer2D.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
+include wx
 
-description "Example of the box <a href=#Viewer2D>Viewer2D</a>."
 author "laurent.guigues@creatis.insa-lyon.fr"
+description "Example of the box <a href=#Viewer2D>Viewer2D</a>."
 category "example"
 
-include vtk/boxes/bbLoadHola
-load wxvtk
+new vtk:LoadHola reader
+
+new wxvtk:Viewer2D viewer
+  set viewer.Slice "20"
+
+new wx:Slider Box02
+
+new wx:LayoutSplit Box03
+  set Box03.Proportion "90"
+
 
-new LoadHola reader
-new Viewer2D viewer
 connect reader.Out viewer.In
 
-# To get the string to int adaptor and set the slice
-load std 
-set viewer.Slice 20
+connect viewer.Widget Box03.Widget1
+
+connect Box02.Widget Box03.Widget2
+
+connect Box02.Out viewer.Slice
+
+connect Box02.BoxChange viewer.BoxExecute
+
+
 
-exec viewer
+# Complex input ports
+exec Box03
diff --git a/packages/wxvtk/bbs/appli/exampleViewerInLayoutTab.bbg b/packages/wxvtk/bbs/appli/exampleViewerInLayoutTab.bbg
new file mode 100644 (file)
index 0000000..2300de5
--- /dev/null
@@ -0,0 +1,81 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleViewerInLayoutTab.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example :Viewer in a LayoutTab
+AUTHOR:jpr@creatis.univ-lyon1.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:7
+BOX
+wx:Slider:slider1
+ISEXEC:FALSE
+-10.656945:-20.720661:-900.000000
+40.743055:-30.720661:-900.000000
+PORT
+Orientation:"V"
+FIN_BOX
+BOX
+wx:Slider:slider2
+ISEXEC:FALSE
+-85.517485:-0.988251:-900.000000
+-34.117485:-10.988251:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider3
+ISEXEC:FALSE
+-66.947476:-23.063855:-900.000000
+-15.547476:-33.063855:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+36.701776:15.273737:-900.000000
+72.951776:5.273737:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer2DImageOriginal
+ISEXEC:FALSE
+13.662750:-65.575535:-900.000000
+66.262750:-75.575535:-900.000000
+PORT
+Slice:"20"
+FIN_BOX
+BOX
+wx:LayoutLine:sizer
+ISEXEC:FALSE
+-78.959365:-80.273255:-900.000000
+-21.399365:-90.273255:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:main
+ISEXEC:TRUE
+-12.023220:-110.546510:-900.000000
+45.536780:-120.546510:-900.000000
+FIN_BOX
+CONNECTIONS:7
+CONNECTION
+reader:Out:viewer2DImageOriginal:In
+NumberOfControlPoints:0
+CONNECTION
+slider2:Widget:sizer:Widget1
+NumberOfControlPoints:0
+CONNECTION
+slider3:Widget:sizer:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider1:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+sizer:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider1:BoxChange:viewer2DImageOriginal:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer2DImageOriginal:Widget:main:Widget3
+NumberOfControlPoints:0
+APP_END
index db01bb368b98e0f4e1c2659d12096eb722066d5e..53c7ea159129cc4fd768ac58211225121fbcfefa 100644 (file)
@@ -1,62 +1,53 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleViewerInLayoutTab.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
 
+include std
+include itkvtk
+include wx
+include vtk
+include wxvtk
 
-description "Example :Viewer in a LayoutTab"
 author "jpr@creatis.univ-lyon1.fr"
+description "Example :Viewer in a LayoutTab"
 category "example"
 
-// WARNING : Doesn't work, right now (25 Nov 2008)
-include std
-include vtk
-include wx
-include wxvtk
+new wx:Slider slider1
+  set slider1.Orientation "V"
 
+new wx:Slider slider2
 
-new Slider slider1
-   set slider1.Orientation V
-new Slider slider2
-new Slider slider3
+new wx:Slider slider3
 
-new LoadHola reader
+new vtk:LoadHola reader
 
-new Viewer2D viewer2DImageOriginal
-connect reader.Out viewer2DImageOriginal.In
-set viewer2DImageOriginal.Slice 20
+new wxvtk:Viewer2D viewer2DImageOriginal
+  set viewer2DImageOriginal.Slice "20"
 
-new LayoutLine  sizer
-new LayoutTab main
+new wx:LayoutLine sizer
+
+new wx:LayoutTab main
+
+
+connect reader.Out viewer2DImageOriginal.In
 
 connect slider2.Widget sizer.Widget1
+
 connect slider3.Widget sizer.Widget2
 
 connect slider1.Widget main.Widget1
+
 connect sizer.Widget main.Widget2
+
 connect slider1.BoxChange viewer2DImageOriginal.BoxExecute
+
 connect viewer2DImageOriginal.Widget main.Widget3
 
-exec viewer2DImageOriginal
+
+
+# Complex input ports
 exec main
diff --git a/packages/wxvtk/bbs/appli/exampleVolumeRendering.bbg b/packages/wxvtk/bbs/appli/exampleVolumeRendering.bbg
new file mode 100644 (file)
index 0000000..d0f8042
--- /dev/null
@@ -0,0 +1,64 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleVolumeRendering.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Volume rendering example
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:5
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+36.250000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:PiecewiseFunction:color
+ISEXEC:FALSE
+-43.190285:17.155882:-900.000000
+0.109715:7.155882:-900.000000
+PORT
+X:"0 500 1000"
+PORT
+Y:"0 0.01 1"
+FIN_BOX
+BOX
+vtk:PiecewiseFunction:opacity
+ISEXEC:FALSE
+15.329606:15.711030:-900.000000
+61.104606:5.711030:-900.000000
+PORT
+X:"0 500 1000"
+PORT
+Y:"0 0.01 0.1"
+FIN_BOX
+BOX
+vtk:VolumeRenderer:renderer
+ISEXEC:FALSE
+-11.929912:-20.300581:-900.000000
+33.195088:-30.300581:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:TRUE
+-15.930767:-53.606966:-900.000000
+47.789233:-63.606966:-900.000000
+FIN_BOX
+CONNECTIONS:4
+CONNECTION
+reader:Out:renderer:In
+NumberOfControlPoints:0
+CONNECTION
+color:Out:renderer:ColorFunction
+NumberOfControlPoints:0
+CONNECTION
+opacity:Out:renderer:OpacityFunction
+NumberOfControlPoints:0
+CONNECTION
+renderer:Out:viewer:In1
+NumberOfControlPoints:0
+APP_END
index b983e0486d84f152da509a44cca39e57b638ffe2..8d31c6edd10de34e2244e18955c910b5535d5d39 100644 (file)
@@ -1,51 +1,44 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleVolumeRendering.bbs
+# ----------------------------------
 
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
 
-description "Volume rendering example"
 author "laurent.guigues at creatis.insa-lyon.fr"
-category "example"     
+description "Volume rendering example"
+category "example"
 
-include vtk
-load wxvtk
+new vtk:LoadHola reader
+
+new vtk:PiecewiseFunction color
+  set color.X "0 500 1000"
+  set color.Y "0 0.01 1"
+
+new vtk:PiecewiseFunction opacity
+  set opacity.X "0 500 1000"
+  set opacity.Y "0 0.01 0.1"
+
+new vtk:VolumeRenderer renderer
+
+new wxvtk:Viewer3D viewer
 
-new LoadHola reader
-new PiecewiseFunction color
-new PiecewiseFunction opacity
-new VolumeRenderer renderer
-new Viewer3D viewer
 
 connect reader.Out renderer.In
+
 connect color.Out renderer.ColorFunction
+
 connect opacity.Out renderer.OpacityFunction
+
 connect renderer.Out viewer.In1
 
-load std
-set color.X "0 500 1000"
-set color.Y "0 0.01 1"
-set opacity.X "0 500 1000"
-set opacity.Y "0 0.01 0.1"
 
+
+# Complex input ports
 exec viewer
diff --git a/packages/wxvtk/bbs/boxes/bbSimpleIsoSurfaceViewer.bbg b/packages/wxvtk/bbs/boxes/bbSimpleIsoSurfaceViewer.bbg
new file mode 100644 (file)
index 0000000..06d4b25
--- /dev/null
@@ -0,0 +1,113 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbSimpleIsoSurfaceViewer.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:viewer
+DESCRIPTION:Simple viewer of an iso-surface of an image
+AUTHOR:laurent.guigues@creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:SimpleIsoSurfaceViewer
+PACKAGENAME:wxvtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+Widget
+29.396698:-80.884809:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:6
+COMPLEX_PORT
+In
+-50.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinDialog
+0.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinTitle
+50.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinWidth
+100.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinHeight
+150.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+BoxExecute
+200.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+BOXES:4
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+41.534742:-43.421797:-900.000000
+80.614742:-53.421797:-900.000000
+PORT
+Proportion:"80"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-23.852972:-1.002246:-900.000000
+39.867028:-11.002246:-900.000000
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface
+ISEXEC:FALSE
+-35.677279:56.327213:-900.000000
+8.822721:46.327213:-900.000000
+PORT
+Isovalue:"10"
+PORT
+Title:"Surface"
+PORT
+Vertical:"0"
+FIN_BOX
+BOX
+std:MultipleInputs:refresh
+ISEXEC:FALSE
+-4.150594:22.599736:-900.000000
+36.224406:12.599736:-900.000000
+FIN_BOX
+CONNECTIONS:12
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+surface:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+surface:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+surface:BoxChange:refresh:In1
+NumberOfControlPoints:0
+CONNECTION
+refresh:Out:viewer:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+In:In:surface:In
+NumberOfControlPoints:0
+CONNECTION
+WinDialog:WinDialog:main:WinDialog
+NumberOfControlPoints:0
+CONNECTION
+WinTitle:WinTitle:main:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+WinWidth:WinWidth:main:WinWidth
+NumberOfControlPoints:0
+CONNECTION
+WinHeight:WinHeight:main:WinHeight
+NumberOfControlPoints:0
+CONNECTION
+BoxExecute:BoxExecute:refresh:In2
+NumberOfControlPoints:0
+CONNECTION
+main:Widget:Widget:Widget
+NumberOfControlPoints:0
+APP_END
index 2e95fa2c25ab58f1a205675d1d696fa626cbceec..adb0cd0f25628c518e87ae1b34c6d65bd70f6937 100644 (file)
@@ -1,74 +1,51 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbSimpleIsoSurfaceViewer.bbs
+# ----------------------------------
 
+include std
+include itkvtk
+include wx
+include wxvtk
+include std
 
-load std
-load wx
-load wxvtk 
-load vtk
+define SimpleIsoSurfaceViewer wxvtk
 
-include wxvtk/boxes/bbIsoSurfaceWidget
+author "laurent.guigues@creatis.insa-lyon.fr"
+description "Simple viewer of an iso-surface of an image"
 
-define SimpleIsoSurfaceViewer wxvtk
+category "viewer"
 
- description "Simple viewer of an iso-surface of an image"
- author "laurent.guigues@creatis.insa-lyon.fr"
- category "viewer"
+new wx:LayoutSplit main
+  set main.Proportion "80"
 
- new LayoutSplit main
- new Viewer3D viewer
+new wxvtk:Viewer3D viewer
 
- new IsoSurfaceWidget surface
+new wxvtk:IsoSurfaceWidget surface
+  set surface.Isovalue "10"
+  set surface.Title "Surface"
+  set surface.Vertical "0"
 
- set surface.Isovalue 10
- set surface.Title "Surface"
- set surface.Vertical 0
+new std:MultipleInputs refresh
 
- connect viewer.Widget  main.Widget1
- connect surface.Widget main.Widget2 
 
- # WE NEED A MultipleInputs BOX TO CONNECT BOTH 
- # surface.BoxChange AND THE INPUT BoxExecute 
- # OF THE COMPLEX BOX TO viewer.BoxExecute
- new MultipleInputs refresh
+connect viewer.Widget main.Widget1
+connect surface.Widget main.Widget2
+connect surface.Out viewer.In1
+connect surface.BoxChange refresh.In1
+connect refresh.Out viewer.BoxExecute
 
-  
- connect surface.Out       viewer.In1
- connect surface.BoxChange refresh.In1
- connect refresh.Out       viewer.BoxExecute
+# Complex input ports
+input In surface.In " "
+input WinDialog main.WinDialog " "
+input WinTitle main.WinTitle " "
+input WinWidth main.WinWidth " "
+input WinHeight main.WinHeight " "
+input BoxExecute refresh.In2 " "
 
- set main.Proportion 80
+# Complex output ports
+output Widget main.Widget " "
 
- input In         surface.In     "Input image"
- input WinDialog  main.WinDialog "Dialog mode"
- input WinTitle   main.WinTitle  "Title of the window"
- input WinWidth   main.WinWidth  "Width of the window"
- input WinHeight  main.WinHeight "Height of the window"
- input BoxExecute refresh.In2    "Execute the box"
+exec main
 
- output Widget main.Widget "Widget"
- # EXECUTING THE COMPLEX BOX EXECUTES the main
- exec main
 endefine
diff --git a/packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbg b/packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbg
new file mode 100644 (file)
index 0000000..96ae7c9
--- /dev/null
@@ -0,0 +1,156 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:viewer
+DESCRIPTION:Simple 2D viewer of a slice of a 3D image. The slice is controlled by a slider. See <a href='#exampleSimpleSlicer'>exampleSimpleSlicer.bbs</a>. Screenshot : <center><img src='ExampleSimpleSlicer.jpg'></center>
+AUTHOR:info-dev@creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:SimpleSlicer
+PACKAGENAME:wxvtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+Widget
+190.888578:-140.367383:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:13
+COMPLEX_PORT
+In
+176.539300:98.168146:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinDialog
+0.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinTitle
+50.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinWidth
+100.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinHeight
+150.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+BoxExecute
+268.389223:98.168146:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Orientation
+250.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Slice
+384.265292:96.336292:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Interpolate
+204.672902:104.274326:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SliderSize
+400.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SliderTitle
+464.654833:98.778764:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SliderOrientation
+413.902854:99.389382:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SliderReactiveOnTrack
+442.531221:97.557528:-900.000000
+FIN_COMPLEX_PORT
+BOXES:4
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+189.908352:-94.533066:-900.000000
+228.988352:-104.533066:-900.000000
+PORT
+Proportion:"80"
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer2D
+ISEXEC:FALSE
+214.458844:-51.932394:-900.000000
+253.538844:-61.932394:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+359.090705:25.563987:-900.000000
+410.490705:15.563987:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:refresh
+ISEXEC:FALSE
+239.657507:-22.837623:-900.000000
+280.032507:-32.837623:-900.000000
+FIN_BOX
+CONNECTIONS:19
+CONNECTION
+viewer2D:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:viewer2D:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:refresh:In1
+NumberOfControlPoints:0
+CONNECTION
+refresh:Out:viewer2D:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+In:In:viewer2D:In
+NumberOfControlPoints:0
+CONNECTION
+WinDialog:WinDialog:main:WinDialog
+NumberOfControlPoints:0
+CONNECTION
+WinTitle:WinTitle:main:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+WinWidth:WinWidth:main:WinWidth
+NumberOfControlPoints:0
+CONNECTION
+WinHeight:WinHeight:main:WinHeight
+NumberOfControlPoints:0
+CONNECTION
+BoxExecute:BoxExecute:refresh:In2
+NumberOfControlPoints:0
+CONNECTION
+Orientation:Orientation:viewer2D:Orientation
+NumberOfControlPoints:0
+CONNECTION
+Slice:Slice:slider:In
+NumberOfControlPoints:0
+CONNECTION
+Interpolate:Interpolate:viewer2D:Interpolate
+NumberOfControlPoints:0
+CONNECTION
+SliderSize:SliderSize:slider:Max
+NumberOfControlPoints:0
+CONNECTION
+SliderTitle:SliderTitle:slider:Title
+NumberOfControlPoints:0
+CONNECTION
+SliderOrientation:SliderOrientation:slider:Orientation
+NumberOfControlPoints:0
+CONNECTION
+SliderReactiveOnTrack:SliderReactiveOnTrack:slider:ReactiveOnTrack
+NumberOfControlPoints:0
+CONNECTION
+main:Widget:Widget:Widget
+NumberOfControlPoints:0
+APP_END
index c4e388d8ebfb92384b82b9f2f0b89727ca7cc247..ddf04dfef50b607ac98178291d0f0a0db43746af 100644 (file)
@@ -1,76 +1,55 @@
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbs
+# ----------------------------------
 
-
-load std
-load wx
-load wxvtk 
+include std
+include itkvtk
+include wx
+include wxvtk
+include std
 
 define SimpleSlicer wxvtk
 
- description "Simple 2D viewer of a slice of a 3D image. The slice is controlled by a slider. See <a href='#exampleSimpleSlicer'>exampleSimpleSlicer.bbs</a>. Screenshot : <center><img src='ExampleSimpleSlicer.jpg'></center>"
- author "info-dev@creatis.insa-lyon.fr"
- category "viewer"
+author "info-dev@creatis.insa-lyon.fr"
+description "Simple 2D viewer of a slice of a 3D image. The slice is controlled by a slider. See <a href='#exampleSimpleSlicer'>exampleSimpleSlicer.bbs</a>. Screenshot : <center><img src='ExampleSimpleSlicer.jpg'></center>"
+
+category "viewer"
+
+new wx:LayoutSplit main
+  set main.Proportion "80"
+
+new wxvtk:Viewer2D viewer2D
+
+new wx:Slider slider
+
+new std:MultipleInputs refresh
 
- new LayoutSplit main
- set main.Proportion 80
- new Viewer2D viewer2D
- new Slider   slider
- # WE NEED a MultipleInputs Box to connect BOTH 
- # slider.BoxChange AND the input BoxExecute 
- # of the Complex box to viewer2D.BoxExecute
- new MultipleInputs refresh
 
- connect viewer2D.Widget  main.Widget1
- connect slider.Widget    main.Widget2
- connect slider.Out       viewer2D.Slice
+connect viewer2D.Widget main.Widget1
+connect slider.Widget main.Widget2
+connect slider.Out viewer2D.Slice
+connect slider.BoxChange refresh.In1
+connect refresh.Out viewer2D.BoxExecute
 
- connect slider.BoxChange refresh.In1
- connect refresh.Out      viewer2D.BoxExecute
+# Complex input ports
+input In viewer2D.In " "
+input WinDialog main.WinDialog " "
+input WinTitle main.WinTitle " "
+input WinWidth main.WinWidth " "
+input WinHeight main.WinHeight " "
+input BoxExecute refresh.In2 " "
+input Orientation viewer2D.Orientation " "
+input Slice slider.In " "
+input Interpolate viewer2D.Interpolate " "
+input SliderSize slider.Max " "
+input SliderTitle slider.Title " "
+input SliderOrientation slider.Orientation " "
+input SliderReactiveOnTrack slider.ReactiveOnTrack " "
 
- #set main.Proportion 80
+# Complex output ports
+output Widget main.Widget " "
 
- input In                    viewer2D.In            "Input image"
- input WinDialog             main.WinDialog         "Execute in dialog mode"
- input WinTitle              main.WinTitle          "Title of the window"
- input WinWidth              main.WinWidth          "Width of the window"
- input WinHeight             main.WinHeight         "Height of the window"
- input BoxExecute            refresh.In2            "Execute the box"
- input Orientation           viewer2D.Orientation   "Slicing orientation : 0:yz / 1:xz / 2:xy"
- input Slice                 slider.In              "Initial slice"
- input Interpolate           viewer2D.Interpolate   "Pixels Interpolation (true/false)" 
- input SliderSize            slider.Max             "Slider Size"
- input SliderTitle           slider.Title           "Slider Title" 
- input SliderOrientation     slider.Orientation     "Slider Orientation (H/V)"
- input SliderReactiveOnTrack slider.ReactiveOnTrack "Reactive On track (default : 0)"
-   
- output Widget main.Widget "Widget"
+exec main
 
- # EXECUTING THE COMPLEX BOX EXECUTES main
- exec main
 endefine
index 731d4978e9df71f99fa2d2004a4633082ec760e1..c99178e0215f16d88f3aeb97847045e765ee606c 100644 (file)
 #include <vtkInteractorStyleImage.h>
 #include <vtkCommand.h>
 #include <vtkImageActor.h>
+#include <wx/gdicmn.h>
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       #include "wxvtkImageViewer2.h"
+#else
+       #include <vtkImageViewer2.h>
+#endif
+
+
+#include "creawxVTKRenderWindowInteractor.h"
+
 namespace bbwxvtk
 {
   //--------------------------------------------------------------------------
@@ -62,33 +74,44 @@ namespace bbwxvtk
     Viewer2DWidget(Viewer2D* box, wxWindow *parent);
     ~Viewer2DWidget();
     void UpdateView();
-    vtkRenderer                *GetRenderer();
-    vtkImageActor       *GetImageActor();
+    vtkRenderer                                        *GetRenderer();
+    vtkImageActor                              *GetImageActor();
   private:
-    bool                        mFirstTime;
-    Viewer2D                    *mBox;
-    wxvtkImageViewer2          *imageViewer;
-    vtkImageData               *backImageData;
-    vtkImageData               *mDefaultImage;
-    wxVTKRenderWindowInteractor *wxvtkrenderwindowinteractor;
+    bool                                       mFirstTime;
+    Viewer2D                                   *mBox;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+    wxvtkImageViewer2                  *imageViewer;
+#else
+    vtkImageViewer2                            *imageViewer;
+#endif
+
+    vtkImageData                               *backImageData;
+    vtkImageData                               *mDefaultImage;
+    crea::wxVTKRenderWindowInteractor *wxvtkrenderwindowinteractor;
     bool mUpdateCamera;
 
     vtkImplicitPlaneWidget * maPlane1, * maPlane2, * mbPlane1, * mbPlane2;
   };
   
-  Viewer2DWidget::Viewer2DWidget(Viewer2D* box,
-                                wxWindow *parent)
+  Viewer2DWidget::Viewer2DWidget(Viewer2D* box,  wxWindow *parent)
     :  
     wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL),
     mFirstTime(true),
     mBox(box)
   {
-    wxPanel *panel     = this;
-
-    wxvtkrenderwindowinteractor = new wxVTKRenderWindowInteractor(panel,-1);
+    wxPanel *panel             = this;
+    wxvtkrenderwindowinteractor = new crea::wxVTKRenderWindowInteractor(panel,-1);
     wxvtkrenderwindowinteractor->UseCaptureMouseOn();  
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     imageViewer        = wxvtkImageViewer2::New();
+#else
+    imageViewer        = vtkImageViewer2::New();
+#endif
+
     imageViewer->SetSlice( 1 );
     imageViewer->SetupInteractor ( wxvtkrenderwindowinteractor );
     
@@ -99,50 +122,66 @@ namespace bbwxvtk
     mDefaultImage->SetDimensions ( dim );
     mDefaultImage->SetSpacing(1,1,1);
     mDefaultImage->SetExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
-    mDefaultImage->SetWholeExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+    mDefaultImage->SetWholeExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
     mDefaultImage->SetScalarTypeToUnsignedChar();
-    mDefaultImage->AllocateScalars();    
-    for (int i=0;i<dim[0];i++) 
-      for (int j=0;j<dim[1];j++) 
-        for (int k=0;k<dim[2];k++) 
-          mDefaultImage->SetScalarComponentFromFloat(i,j,k,0,0);
-
-    for (int i=0;i<dim[0];i++) 
-      {
-       /*
-       mDefaultImage->SetScalarComponentFromFloat(i,0,0,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,0,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(0,i,0,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,0,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(i,0,1,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,1,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(0,i,1,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,1,0,255);
-       */
-       mDefaultImage->SetScalarComponentFromFloat(i,i,0,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,0,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(i,i,1,0,255);
-       mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,1,0,255);
-      }
+    mDefaultImage->AllocateScalars();   
+#else
+    mDefaultImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);   
+#endif
+       int i,j,k;
+    for (i=0;i<dim[0];i++) 
+       {
+               for (j=0;j<dim[1];j++)
+               { 
+                       for (k=0;k<dim[2];k++)
+                       { 
+                          mDefaultImage->SetScalarComponentFromFloat(i,j,k,0,0);
+                       } // for k
+               }// for j
+       } // for i
+
+    for (i=0;i<dim[0];i++) 
+       {
+               /*
+               mDefaultImage->SetScalarComponentFromFloat(i,0,0,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,0,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(0,i,0,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,0,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(i,0,1,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,1,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(0,i,1,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,1,0,255);
+               */
+               mDefaultImage->SetScalarComponentFromFloat(i,i,0,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,0,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(i,i,1,0,255);
+               mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,1,0,255);
+      } // for i
 
+    mDefaultImage->Modified();
     backImageData = mDefaultImage;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     imageViewer->SetInput( backImageData );
-    mUpdateCamera = true;
+#else
+    imageViewer->SetInputData( backImageData );
+#endif
 
+    mUpdateCamera = true;
     wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
     sizer->Add( wxvtkrenderwindowinteractor, 1, wxEXPAND, 0);
     panel->SetSizer(sizer);
     panel->SetAutoLayout(true);
     panel->Layout();
-
-
     //  wxvtkrenderwindowinteractor->Refresh();
     //  wxvtkrenderwindowinteractor->Render();
     //  imageViewer->GetRenderer()->ResetCameraClippingRange();
-
     imageViewer->GetRenderer()->SetBackground(0.1,0.1,0.2);
-
   }
   //-------------------------------------------------------------------------
   
@@ -157,93 +196,94 @@ namespace bbwxvtk
     mDefaultImage->Delete();
 
     if (backImageData)
-      {
-       //      backImageData->UnRegister(NULL);
-      }
+    {
+//             backImageData->UnRegister(NULL);
+    }
     if (imageViewer) 
-      {
-       imageViewer->Delete();
-      }
+    {
+               imageViewer->Delete();
+    }
     delete wxvtkrenderwindowinteractor;
     //    std::cout << "Viewer2DWidget::~Viewer2DWidget() OK" << std::endl;
   }
 
   //-------------------------------------------------------------------------
-
-
   void Viewer2DWidget::UpdateView()
   {
     //    std::cout << "Viewer2DWidget::UpdateView() " << std::endl;
     //    std::cout << "slice="<<mBox->bbGetInputSlice()<<std::endl;
     mUpdateCamera = false; //JPR  
-    if ( ( mBox->bbGetInputIn() == NULL ) &&
-        ( backImageData != mDefaultImage ) )
-      {
-       // 
-       //      std::cout << "** Viewer2DWidget::UpdateView() : NULL Input (reset)" <<std::endl;
-       backImageData = mDefaultImage;
-       mUpdateCamera = true;
-      }
-    else if ( ( mBox->bbGetInputIn() != NULL ) && 
+    if ( ( mBox->bbGetInputIn() == NULL ) && ( backImageData != mDefaultImage ) )
+    {
+               // 
+               //      std::cout << "** Viewer2DWidget::UpdateView() : NULL Input (reset)" <<std::endl;
+               backImageData = mDefaultImage;
+               mUpdateCamera = true;
+    } else if ( ( mBox->bbGetInputIn() != NULL ) && 
              (( mBox->bbGetInputStatus("In") != bbtk::UPTODATE  ) ||
               ( mFirstTime))
              )
              //(backImageData != mBox->bbGetInputIn()) ) 
-      {        
-       //      std::cout << "** Viewer2DWidget::UpdateView() : Input changed"  <<std::endl;
-       mFirstTime = false;
-       if (backImageData != mBox->bbGetInputIn()) // Don't update if just Slice changed
-         {
-         backImageData = mBox->bbGetInputIn();
-         backImageData->Update();
-         imageViewer->SetInput( backImageData );
-         mUpdateCamera = true;
-         }
-      }
+       {       
+               //      std::cout << "** Viewer2DWidget::UpdateView() : Input changed"  <<std::endl;
+               mFirstTime = false;
+               if (backImageData != mBox->bbGetInputIn()) // Don't update if just Slice changed
+               {
+                 backImageData = mBox->bbGetInputIn();
+       //EED 2017-01-01 Migration VTK7
+       #if VTK_MAJOR_VERSION <= 5
+                 backImageData->Update();
+                 imageViewer->SetInput( backImageData );
+       #else
+                 imageViewer->SetInputData( backImageData );
+       #endif
+                 mUpdateCamera = true;
+               } // if BackImageData
+      } // if BoxInputIn
 
     if (mUpdateCamera)
-      {
-       //      std::cout << "** Viewer2DWidget::UpdateView() : Update Camera"
-       //                <<std::endl;
-       int x1,x2,y1,y2,z1,z2;
-       double spx,spy,spz;
-       backImageData->GetSpacing(spx,spy,spz);
-       backImageData->GetExtent (x1,x2,y1,y2,z1,z2);
+    {
+               //      std::cout << "** Viewer2DWidget::UpdateView() : Update Camera"
+               //                <<std::endl;
+               int x1,x2,y1,y2,z1,z2;
+               double spx,spy,spz;
+               backImageData->GetSpacing(spx,spy,spz);
+               backImageData->GetExtent (x1,x2,y1,y2,z1,z2);
        
-       double *range = backImageData->GetScalarRange();
-       imageViewer->SetColorWindow(range[1] - range[0]);
-       imageViewer->SetColorLevel(0.5 * (range[1] + range[0]));
-
-       imageViewer->GetRenderer()->ResetCamera();
-       double bounds[6];
-       imageViewer->GetRenderer()->ComputeVisiblePropBounds(bounds);
-       imageViewer->GetRenderer()->ResetCameraClippingRange(bounds);
+               double *range = backImageData->GetScalarRange();
+               imageViewer->SetColorWindow(range[1] - range[0]);
+               imageViewer->SetColorLevel(0.5 * (range[1] + range[0]));
+
+               imageViewer->GetRenderer()->ResetCamera();
+               double bounds[6];
+               imageViewer->GetRenderer()->ComputeVisiblePropBounds(bounds);
+               imageViewer->GetRenderer()->ResetCameraClippingRange(bounds);
        
-       //      bbtkMessage("Output",2,"Viewer2D '"<<mBox->bbGetName()<<"' - Image :"<<std::endl);
-       //      std::cout << " extent  = "<< x1<<"-"<<x2<<" x "<<y1<<"-"<<y2<<" x "<<z1<<"-"<<z2<<std::endl;
-       //      std::cout << " spacing = "<<spx << " - "<< spy << " - "<<spz<<std::endl;
-       /*
-       vtkCamera *camera = imageViewer->GetRenderer()->GetActiveCamera();
-
-       camera->SetViewUp    ( spx*0,         -spy*1,        spz*0 );
-       camera->SetPosition  ( spx*(x1+x2)/2, spy*(y1+y2)/2, -spz*10000000 ); 
-       camera->SetFocalPoint( spx*(x1+x2)/2, spy*(y1+y2)/2, spz*0 ); 
-
-       camera->ComputeViewPlaneNormal();
-       camera->SetParallelScale(  spx*(x2-x1)/2.0 );
-       //   
-       //      imageViewer->GetRenderer()->ResetCamera(x1,x2,y1,y2,z1,z2);
-       mUpdateCamera = false;
-       //      std::cout << "Viewer2DWidget::UpdateView() passe par 3" << std::endl;
-       imageViewer->SetColorWindow(512);
-       imageViewer->SetColorLevel(256);
-       */
-        /*
-       for (int i=0;i<10;i++)
-         for (int j=0;j<10;j++)
-           std::cout << mBox->bbGetInputIn()->GetScalarComponentAsFloat(i,j,0,0)
-                     << std::endl;
-        */
+               //      bbtkMessage("Output",2,"Viewer2D '"<<mBox->bbGetName()<<"' - Image :"<<std::endl);
+               //      std::cout << " extent  = "<< x1<<"-"<<x2<<" x "<<y1<<"-"<<y2<<" x "<<z1<<"-"<<z2<<std::endl;
+               //      std::cout << " spacing = "<<spx << " - "<< spy << " - "<<spz<<std::endl;
+               /*
+               vtkCamera *camera = imageViewer->GetRenderer()->GetActiveCamera();
+
+               camera->SetViewUp    ( spx*0,         -spy*1,        spz*0 );
+               camera->SetPosition  ( spx*(x1+x2)/2, spy*(y1+y2)/2, -spz*10000000 ); 
+               camera->SetFocalPoint( spx*(x1+x2)/2, spy*(y1+y2)/2, spz*0 ); 
+
+               camera->ComputeViewPlaneNormal();
+               camera->SetParallelScale(  spx*(x2-x1)/2.0 );
+               //   
+               //      imageViewer->GetRenderer()->ResetCamera(x1,x2,y1,y2,z1,z2);
+               mUpdateCamera = false;
+               //      std::cout << "Viewer2DWidget::UpdateView() passe par 3" << std::endl;
+               imageViewer->SetColorWindow(512);
+               imageViewer->SetColorLevel(256);
+               */
+                /*
+               for (int i=0;i<10;i++)
+                 for (int j=0;j<10;j++)
+                       std::cout << mBox->bbGetInputIn()->GetScalarComponentAsFloat(i,j,0,0)
+                                 << std::endl;
+                */
     }
 
     //  std::cout << "OW = "<< mBox->bbGetWindow() << std::endl;
@@ -252,13 +292,15 @@ namespace bbwxvtk
 
     bool interp = mBox->bbGetInputInterpolate();
     if ( interp )
+       {
        imageViewer->GetImageActor()->InterpolateOn();
-    else
+    } else {
        imageViewer->GetImageActor()->InterpolateOff();
-       
+       }
     
     int orientation = mBox->bbGetInputOrientation();
-    if (orientation<0 || orientation>2) {
+    if (orientation<0 || orientation>2) 
+       {
        bbtkMessage("Output", 2, "Viewer2D : Orientation was not 0< <2 "<<std::endl);
        orientation=2; // Why not?      
     }
@@ -266,13 +308,18 @@ namespace bbwxvtk
     // mBox->bbIsShown() is necessary to be sure that the wxWindow is already 
     // created and displayed. 
     // Else when slice != 0 we get an X Window System error with wxGTK
-    if (
-       (backImageData!=NULL)&&
-       (mBox->bbIsShown()))
+    if ( (backImageData!=NULL) && (mBox->bbIsShown()) )
     {
                int z = mBox->bbGetInputSlice();
                int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                backImageData->GetWholeExtent(ext);
+#else
+               backImageData->GetExtent(ext);
+#endif
+
                /*
                std::cout << "ext = "<<ext[0]<<" - "<<ext[1]<<" ; "
                          <<ext[2]<<" - "<<ext[3]<<" ; "
@@ -300,22 +347,30 @@ namespace bbwxvtk
                bbtkMessage("Output", 2, "Viewer2D : Orientation was not 0< <2 (shouldn't arrive here!"<<std::endl);
                z = ext[5]; // Why not?
            }
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
            wxvtkrenderwindowinteractor->Refresh();
+#else
+               //wxRect *rect=new wxRect(0, 0, 50, 50);
+           //wxvtkrenderwindowinteractor->Refresh(true, rect);
+               // ..
+#endif
+
            wxvtkrenderwindowinteractor->Render();
            bbtkDebugMessage("Output",3,"Viewer2D : slice = "<<z<<std::endl);
            imageViewer->SetSliceOrientation (orientation);
            imageViewer->SetSlice( z );
+    } // if backImageData
 
-    }   
-  }
-
-
-  vtkRenderer * Viewer2DWidget::GetRenderer()
-  {
-         return imageViewer->GetRenderer();
-  }
 
+}
 
+  //--------------------------------------------------------------------------
+vtkRenderer * Viewer2DWidget::GetRenderer()
+{
+       return imageViewer->GetRenderer();
+}
 
   //--------------------------------------------------------------------------
   //-------------------------------------------------------------------------
@@ -356,9 +411,9 @@ namespace bbwxvtk
     //    std::cout << "Slice="<<bbtk::GetIOStatusString(bbGetInputStatus("Slice")) << std::endl;
     Viewer2DWidget* w = (Viewer2DWidget*)bbGetOutputWidget(); 
     if (w)
-      {      
-       w->UpdateView();
-      }
+       {      
+               w->UpdateView();
+    }
     bbSetOutputOut( bbGetInputSlice() );  
   }
   
index f63399fa592fa14c8d81c0ebbd99a07ca3e40557..2acb2834fdf428aa472ce139c5c7d49a61a38dda 100644 (file)
 #define __bbwxvtkViewer2D_h__
 
 #include "vtkImageData.h"
-#include "wxvtkImageViewer2.h"
 #include "vtkImplicitPlaneWidget.h"
 
 #include "bbtkWxBlackBox.h"
-#include "wxVTKRenderWindowInteractor.h"
+
+#include "creawxVTKRenderWindowInteractor.h"
 
 namespace bbwxvtk
 {
index 1d5fd58d97ee02fb2dcc677fd9e62856cfd9c10b..c0ece1383b554253a3c4b40e91a120a13ee097b1 100644 (file)
@@ -62,7 +62,7 @@ namespace bbwxvtk
   {
     wxPanel *panel = this;
 
-    wxvtkrenderwindowinteractor = new wxVTKRenderWindowInteractor(panel,-1);
+    wxvtkrenderwindowinteractor = new crea::wxVTKRenderWindowInteractor(panel,-1);
     wxvtkrenderwindowinteractor->UseCaptureMouseOn();
 
    renderer     = vtkRenderer::New();
@@ -144,7 +144,7 @@ namespace bbwxvtk
   //-------------------------------------------------------------------------
 
   //-------------------------------------------------------------------------
-  wxVTKRenderWindowInteractor * Viewer3DWidget::GetInteractor()
+  crea::wxVTKRenderWindowInteractor * Viewer3DWidget::GetInteractor()
   {
     return wxvtkrenderwindowinteractor;
   }
index 25dc71231fad950babc9d346cc61ea3f70c08de9..d353d59f1f71cdf53cab8cc60796e59401451657 100644 (file)
@@ -61,7 +61,7 @@
 #include <vtkInteractorStyleTrackballCamera.h>
 
 #include "bbtkWxBlackBox.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 
 
@@ -78,15 +78,15 @@ namespace bbwxvtk
 
     void Update();
     vtkRenderer *GetRenderer();
-    wxVTKRenderWindowInteractor * GetInteractor();
+    crea::wxVTKRenderWindowInteractor * GetInteractor();
     virtual void Refresh(bool eraseBackground = true, const wxRect* rect = NULL);
 
   private:
-    Viewer3D*            mBox;
-    vtkRenderer                  *renderer;
-    vtkRenderWindow              *renderwindow;
-    vtkInteractorStyleTrackballCamera *interactorstyle;
-    wxVTKRenderWindowInteractor  *wxvtkrenderwindowinteractor;
+    Viewer3D                                                   *mBox;
+    vtkRenderer                                *renderer;
+    vtkRenderWindow                            *renderwindow;
+    vtkInteractorStyleTrackballCamera  *interactorstyle;
+    crea::wxVTKRenderWindowInteractor          *wxvtkrenderwindowinteractor;
   };
   
   //------------------------------------------------------------------------
@@ -109,7 +109,7 @@ namespace bbwxvtk
     BBTK_DECLARE_INPUT(Stereo, bool);
     BBTK_DECLARE_INPUT(BackgroundColor,std::vector<double>);
     BBTK_DECLARE_OUTPUT(Renderer,vtkRenderer*);
-    BBTK_DECLARE_OUTPUT(Interactor,wxVTKRenderWindowInteractor*);
+    BBTK_DECLARE_OUTPUT(Interactor,crea::wxVTKRenderWindowInteractor*);
     BBTK_PROCESS(Process);
     BBTK_CREATE_WIDGET(CreateWidget);
     BBTK_ON_SHOW_WIDGET(OnShowWidget);
@@ -144,7 +144,7 @@ namespace bbwxvtk
   BBTK_INPUT(Viewer3D,Obs5,"Input observer",vtkInteractorObserver *,"");
   BBTK_INPUT(Viewer3D,Stereo,"Stereo with Red-Blue filter.  False/True  (default False)",bool,"");
   BBTK_OUTPUT(Viewer3D,Renderer,"Renderer to which actors can be added.",vtkRenderer*,"");
-  BBTK_OUTPUT(Viewer3D,Interactor,"Interactor with which vtk widgets can interact",wxVTKRenderWindowInteractor*,"");
+  BBTK_OUTPUT(Viewer3D,Interactor,"Interactor with which vtk widgets can interact",crea::wxVTKRenderWindowInteractor*,"");
   BBTK_END_DESCRIBE_BLACK_BOX(Viewer3D);
   //=================================================================
 
index 36d16a9aa51c50f599eec773cf74f9a5e5e6f17c..2c206a0a4c3177847e152c82d3ed593538405da3 100644 (file)
@@ -28,7 +28,7 @@
 #ifdef _USE_VTK_
 
 #include "bbstdCast.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 #include "bbwxvtkPackage.h"
 
 
@@ -48,7 +48,7 @@ namespace bbwxvtk
 {
   //====================================================================
   // Add the specialized adaptors to the package
-  typedef wxVTKRenderWindowInteractor* I;
+  typedef crea::wxVTKRenderWindowInteractor* I;
   typedef vtkRenderWindowInteractor* O;
 
   BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(wxvtk,Cast,I,O);
diff --git a/packages/wxvtk/src/wxVTKRenderWindowInteractor.cxx b/packages/wxvtk/src/wxVTKRenderWindowInteractor.cxx
deleted file mode 100644 (file)
index ea44bbb..0000000
+++ /dev/null
@@ -1,813 +0,0 @@
-/*
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
-
-/*=========================================================================
-
-  Program:   Visualization Toolkit
-  Module:    $RCSfile: wxVTKRenderWindowInteractor.cxx,v $
-  Language:  C++
-  Date:      $Date: 2012/11/16 08:52:36 $
-  Version:   $Revision: 1.5 $
-
-=========================================================================*/
-
-#include <assert.h>
-
-#include "wxVTKRenderWindowInteractor.h"
-
-//This is needed for vtk 3.1 :
-#ifndef VTK_MAJOR_VERSION
-#  include "vtkVersion.h"
-#endif
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-#  include "vtkCommand.h"
-#else
-#  include "vtkInteractorStyle.h"
-#endif
-#include "vtkDebugLeaks.h"
-
-#ifdef __WXMAC__
-#include "vtkCarbonRenderWindow.h"
-#endif
-
-//=======================================================================
-// LG : NAMESPACE IS NECESSARY TO AVOID CONFLICTING SYMBOLS IN DYN LIBS
-namespace bbwxvtk
-{
-
-
-//Keep this for compatibilty reason, this was introduced in wxGTK 2.4.0
-#if (!wxCHECK_VERSION(2, 4, 0))
-wxWindow* wxGetTopLevelParent(wxWindow *win)
-{
-    while ( win && !win->IsTopLevel() )
-         win = win->GetParent();
-    return win;
-}
-#endif
-}
-// LG : EO namespace bbwxvtk
-//=======================================================================
-
-// To access objc calls on cocoa
-#ifdef __WXCOCOA__
-#ifdef VTK_USE_COCOA
-#import <Cocoa/Cocoa.h>
-// This trick is no longer need in VTK CVS, should get rid of that:
-#define id Id
-#else
-#error Build mismatch you need both wxWidgets and VTK to be configure against Cocoa to work
-#endif //VTK_USE_COCOA
-#endif //__WXCOCOA__
-
-#ifdef __WXGTK__
-#    include <gdk/gdkx.h> // GDK_WINDOW_XWINDOW is found here in wxWidgets 2.8.0
-#    include "gdk/gdkprivate.h"
-#if wxCHECK_VERSION(2, 8, 0)
-#ifdef __WXGTK20__
-#include <wx/gtk/win_gtk.h>
-#else
-#include <wx/gtk1/win_gtk.h>
-#endif
-#else
-#include <wx/gtk/win_gtk.h>
-#endif
-#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
-                          GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
-                          GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
-#endif
-
-#ifdef __WXX11__
-#include "wx/x11/privx.h"
-#define GetXWindow(wxwin)   ((Window)(wxwin)->GetHandle())
-#endif
-
-
-//For more info on this class please go to:
-//http://wxvtk.sf.net
-//This hack is for some buggy wxGTK version:
-#if wxCHECK_VERSION(2, 3, 2) && !wxCHECK_VERSION(2, 4, 1) && defined(__WXGTK__)
-#  define WX_USE_X_CAPTURE 0
-#else
-#  define WX_USE_X_CAPTURE 1
-#endif
-
-#define ID_wxVTKRenderWindowInteractor_TIMER 1001
-
-//=======================================================================
-// LG : NAMESPACE IS NECESSARY TO AVOID CONFLICTING SYMBOLS IN DYN LIBS
-namespace bbwxvtk
-{
-
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxGLCanvas)
-#else
-IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxWindow)
-#endif  //__WXGTK__
-
-//---------------------------------------------------------------------------
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxGLCanvas)
-#else
-BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxWindow)
-#endif //__WXGTK__
-  //refresh window by doing a Render
-  EVT_PAINT       (wxVTKRenderWindowInteractor::OnPaint)
-  EVT_ERASE_BACKGROUND(wxVTKRenderWindowInteractor::OnEraseBackground)
-  EVT_MOTION      (wxVTKRenderWindowInteractor::OnMotion)
-
-  //Bind the events to the event converters
-  EVT_LEFT_DOWN   (wxVTKRenderWindowInteractor::OnButtonDown)
-  EVT_MIDDLE_DOWN (wxVTKRenderWindowInteractor::OnButtonDown)
-  EVT_RIGHT_DOWN  (wxVTKRenderWindowInteractor::OnButtonDown)
-  EVT_LEFT_UP     (wxVTKRenderWindowInteractor::OnButtonUp)
-  EVT_MIDDLE_UP   (wxVTKRenderWindowInteractor::OnButtonUp)
-  EVT_RIGHT_UP    (wxVTKRenderWindowInteractor::OnButtonUp)
-#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
-  EVT_ENTER_WINDOW(wxVTKRenderWindowInteractor::OnEnter)
-  EVT_LEAVE_WINDOW(wxVTKRenderWindowInteractor::OnLeave)
-  EVT_MOUSEWHEEL  (wxVTKRenderWindowInteractor::OnMouseWheel)
-  EVT_KEY_DOWN    (wxVTKRenderWindowInteractor::OnKeyDown)
-  EVT_KEY_UP      (wxVTKRenderWindowInteractor::OnKeyUp)
-  EVT_CHAR        (wxVTKRenderWindowInteractor::OnChar)
-#endif
-  EVT_TIMER       (ID_wxVTKRenderWindowInteractor_TIMER, wxVTKRenderWindowInteractor::OnTimer)
-  EVT_SIZE        (wxVTKRenderWindowInteractor::OnSize)
-END_EVENT_TABLE()
-
-vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
-vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor)
-
-//---------------------------------------------------------------------------
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-#if (wxCHECK_VERSION(2, 8, 0))
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxGLCanvas(0, -1, wxDefaultPosition), vtkRenderWindowInteractor()
-#else
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxGLCanvas(), vtkRenderWindowInteractor()
-#endif
-#else
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxWindow(), vtkRenderWindowInteractor()
-#endif //__WXGTK__
-      , timer(this, ID_wxVTKRenderWindowInteractor_TIMER)
-      , ActiveButton(wxEVT_NULL)
-      , RenderAllowed(0)
-      , Stereo(0)
-      , Handle(0)
-      , Created(true)
-      , RenderWhenDisabled(1)
-      , UseCaptureMouse(0)
-{
-#ifdef VTK_DEBUG_LEAKS
-  vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
-#endif
-  this->RenderWindow = NULL;
-  this->SetRenderWindow(vtkRenderWindow::New());
-  this->RenderWindow->Delete();
-}
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor(wxWindow *parent,
-                                                         wxWindowID id,
-                                                         const wxPoint &pos,
-                                                         const wxSize &size,
-                                                         long style,
-                                                         const wxString &name)
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-      : wxGLCanvas(parent, id, pos, size, style, name), vtkRenderWindowInteractor()
-#else
-      : wxWindow(parent, id, pos, size, style, name), vtkRenderWindowInteractor()
-#endif //__WXGTK__
-      , timer(this, ID_wxVTKRenderWindowInteractor_TIMER)
-      , ActiveButton(wxEVT_NULL)
-      , RenderAllowed(0)
-      , Stereo(0)
-      , Handle(0)
-      , Created(true)
-      , RenderWhenDisabled(1)
-      , UseCaptureMouse(0)
-{
-#ifdef VTK_DEBUG_LEAKS
-  vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
-#endif
-  this->RenderWindow = NULL;
-  this->SetRenderWindow(vtkRenderWindow::New());
-  this->RenderWindow->Delete();
-#ifdef __WXMAC__
-  // On Mac (Carbon) we don't get notified of the initial window size with an EVT_SIZE event,
-  // so we update the size information of the interactor/renderwindow here
-  this->UpdateSize(size.x, size.y);
-#endif
-}
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractor::~wxVTKRenderWindowInteractor()
-{
-  SetRenderWindow(NULL);
-  SetInteractorStyle(NULL);
-}
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractor * wxVTKRenderWindowInteractor::New()
-{
-  // we don't make use of the objectfactory, because we're not registered
-  return new wxVTKRenderWindowInteractor;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Initialize()
-{
-  int *size = RenderWindow->GetSize();
-  // enable everything and start rendering
-  Enable();
-  //RenderWindow->Start();
-
-  // set the size in the render window interactor
-  Size[0] = size[0];
-  Size[1] = size[1];
-
-  // this is initialized
-  Initialized = 1;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Enable()
-{
-  // if already enabled then done
-  if (Enabled)
-    return;
-
-  // that's it
-  Enabled = 1;
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-  SetCurrent();
-#endif
-  Modified();
-}
-//---------------------------------------------------------------------------
-bool wxVTKRenderWindowInteractor::Enable(bool enable)
-{
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-  return wxGLCanvas::Enable(enable);
-#else
-  return wxWindow::Enable(enable);
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Disable()
-{
-  // if already disabled then done
-  if (!Enabled)
-    return;
-
-  // that's it (we can't remove the event handler like it should be...)
-  Enabled = 0;
-  Modified();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Start()
-{
-  // the interactor cannot control the event loop
-  vtkErrorMacro( << "wxVTKRenderWindowInteractor::Start() "
-    "interactor cannot control event loop.");
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::UpdateSize(int x, int y)
-{
-  if( RenderWindow )
-  {
-    // if the size changed tell render window
-    if ( x != Size[0] || y != Size[1] )
-    {
-      // adjust our (vtkRenderWindowInteractor size)
-      Size[0] = x;
-      Size[1] = y;
-      // and our RenderWindow's size
-      RenderWindow->SetSize(x, y);
-    }
-  }
-}
-//---------------------------------------------------------------------------
-int wxVTKRenderWindowInteractor::CreateTimer(int WXUNUSED(timertype))
-{
-  // it's a one shot timer
-  if (!timer.Start(10, TRUE))
-    assert(false);
-
-  return 1;
-  
-}
-//---------------------------------------------------------------------------
-int wxVTKRenderWindowInteractor::DestroyTimer()
-{
-  // do nothing
-  return 1;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnTimer(wxTimerEvent& WXUNUSED(event))
-{
-  if (!Enabled)
-    return;
-    
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::TimerEvent, NULL);
-#else
-    // old style
-    InteractorStyle->OnTimer();
-#endif
-}
-
-//---------------------------------------------------------------------------
-// NOTE on implementation:
-// Bad luck you ended up in the only tricky place of this code.
-// A few note, wxWidgets still refuse to provide such convenient method
-// so I have to maintain it myself, eventhough this is completely integrated
-// in wxPython...
-// Anyway if this happen to break for you then compare to a recent version of wxPython
-// and look for the function long wxPyGetWinHandle(wxWindow* win)
-// in wxPython/src/helpers.cpp
-long wxVTKRenderWindowInteractor::GetHandleHack()
-{
-  //helper function to hide the MSW vs GTK stuff
-  long handle_tmp = 0;
-
-// __WXMSW__ is for Win32
-//__WXMAC__ stands for using Carbon C-headers, using either the CarbonLib/CFM or the native Mach-O builds (which then also use the latest features available)
-// __WXGTK__ is for both gtk 1.2.x and gtk 2.x
-#if defined(__WXMSW__) || defined(__WXMAC__)
-    handle_tmp = (long)this->GetHandle();
-#endif //__WXMSW__
-
-//__WXCOCOA__ stands for using the objective-c Cocoa API
-#ifdef __WXCOCOA__
-   // Here is how to find the NSWindow
-   wxTopLevelWindow* toplevel = dynamic_cast<wxTopLevelWindow*>(
-     wxGetTopLevelParent( this ) );
-   if (toplevel != NULL )    
-   {
-     handle_tmp = (long)toplevel->GetNSWindow();
-   }
-   // The NSView will be deducted from 
-   // [(NSWindow*)Handle contentView]
-   // if only I knew how to write that in c++
-#endif //__WXCOCOA__
-
-    // Find and return the actual X-Window.
-#if defined(__WXGTK__) || defined(__WXX11__)
-    return (long)GetXWindow(this);
-#endif
-
-//#ifdef __WXMOTIF__
-//    handle_tmp = (long)this->GetXWindow();
-//#endif
-
-  return handle_tmp;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnPaint(wxPaintEvent& WXUNUSED(event))
-{
-  //must always be here
-  wxPaintDC pDC(this);
-
-  //do it here rather than in the cstor: this is safer.
-  if(!Handle)
-  {
-    Handle = GetHandleHack();
-    RenderWindow->SetWindowId(reinterpret_cast<void *>(Handle));
-#ifdef __WXMSW__
-    RenderWindow->SetParentId(reinterpret_cast<void *>(this->GetParent()->GetHWND()));
-#endif //__WXMSW__
-  }
-  // get vtk to render to the wxWindows
-  Render();
-#ifdef __WXMAC__
-  // This solves a problem with repainting after a window resize
-  // See also: http://sourceforge.net/mailarchive/forum.php?thread_id=31690967&forum_id=41789
-  vtkCarbonRenderWindow* rwin = vtkCarbonRenderWindow::SafeDownCast(RenderWindow);
-  if( rwin )
-  {
-    rwin->UpdateGLRegion();
-  }
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)
-{
-  //turn off background erase to reduce flickering on MSW
-  event.Skip(false);
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent& WXUNUSED(event))
-{
-  int w, h;
-  GetClientSize(&w, &h);
-  UpdateSize(w, h);
-
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  InvokeEvent(vtkCommand::ConfigureEvent, NULL);
-#endif
-  //this will check for Handle
-  //Render();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
-{
- if (!Enabled) 
-    {
-    return;
-    }
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-    event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
-  InvokeEvent(vtkCommand::MouseMoveEvent, NULL);
-#else
-  InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(),
-    event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-}
-//---------------------------------------------------------------------------
-#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
-void wxVTKRenderWindowInteractor::OnEnter(wxMouseEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-      event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
-  InvokeEvent(vtkCommand::EnterEvent, NULL);
-#else
-    // old style
-  InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);  
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnLeave(wxMouseEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-      event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
-  InvokeEvent(vtkCommand::LeaveEvent, NULL);
-#else
-    // old style
-  InteractorStyle->OnLeave(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);  
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnKeyDown(wxKeyEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  int keycode = event.GetKeyCode();
-  char key = '\0';
-  if (((unsigned int)keycode) < 256)
-  {
-    // TODO: Unicode in non-Unicode mode ??
-    key = (char)keycode;
-  }
-
-  // we don't get a valid mouse position inside the key event on every platform
-  // so we retrieve the mouse position explicitly and pass it along
-  wxPoint mousePos = ScreenToClient(wxGetMousePosition());
-  SetEventInformationFlipY(mousePos.x, mousePos.y, 
-                           event.ControlDown(), event.ShiftDown(), key, 0, NULL);
-  InvokeEvent(vtkCommand::KeyPressEvent, NULL);
-#else
-  InteractorStyle->OnKeyDown(event.ControlDown(), event.ShiftDown(), 
-    event.GetKeyCode(), 1);
-#endif
-  event.Skip();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnKeyUp(wxKeyEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  int keycode = event.GetKeyCode();
-  char key = '\0';
-  if (((unsigned int)keycode) < 256)
-  {
-    // TODO: Unicode in non-Unicode mode ??
-    key = (char)keycode;
-  }
-
-  // we don't get a valid mouse position inside the key event on every platform
-  // so we retrieve the mouse position explicitly and pass it along
-  wxPoint mousePos = ScreenToClient(wxGetMousePosition());
-  SetEventInformationFlipY(mousePos.x, mousePos.y, 
-                           event.ControlDown(), event.ShiftDown(), key, 0, NULL);
-  InvokeEvent(vtkCommand::KeyReleaseEvent, NULL);
-#else
-  InteractorStyle->OnKeyUp(event.ControlDown(), event.ShiftDown(), 
-    event.GetKeyCode(), 1);
-#endif
-  event.Skip();
-}
-#endif //!(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
- //---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnChar(wxKeyEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-    
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  // new style
-  int keycode = event.GetKeyCode();
-  char key = '\0';
-  if (((unsigned int)keycode) < 256)
-    {
-    // TODO: Unicode in non-Unicode mode ??
-    key = (char)keycode;
-    }
-
-  // we don't get a valid mouse position inside the key event on every platform
-  // so we retrieve the mouse position explicitly and pass it along
-  wxPoint mousePos = ScreenToClient(wxGetMousePosition());
-  SetEventInformationFlipY(mousePos.x, mousePos.y, 
-                           event.ControlDown(), event.ShiftDown(), key, 0, NULL);
-  InvokeEvent(vtkCommand::CharEvent, NULL);
-#endif
-  event.Skip();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnButtonDown(wxMouseEvent &event)
-{
-  if (!Enabled || (ActiveButton != wxEVT_NULL))
-    {
-    return;
-    }
-  ActiveButton = event.GetEventType();
-
-    // On Mac (Carbon) and Windows we don't automatically get the focus when
-    // you click inside the window
-    // we therefore set the focus explicitly
-    // Apparently we need that on linux (GTK) too:
-    this->SetFocus();
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-    event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-#endif
-
-  if(event.RightDown())
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::RightButtonPressEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnRightButtonDown(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(event.LeftDown())
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnLeftButtonDown(event.ControlDown(),  event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(event.MiddleDown())
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::MiddleButtonPressEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnMiddleButtonDown(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  //save the button and capture mouse until the button is released
-  //Only if :
-  //1. it is possible (WX_USE_X_CAPTURE)
-  //2. user decided to.
-  if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse)
-  {
-    CaptureMouse();
-  }
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnButtonUp(wxMouseEvent &event)
-{
-  //EVT_xxx_DOWN == EVT_xxx_UP - 1
-  //This is only needed if two mouse buttons are pressed at the same time.
-  //In wxWindows 2.4 and later: better use of wxMOUSE_BTN_RIGHT or 
-  //wxEVT_COMMAND_RIGHT_CLICK
-  if (!Enabled || (ActiveButton != (event.GetEventType()-1))) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-    event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-#endif
-  
-  if(ActiveButton == wxEVT_RIGHT_DOWN)
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::RightButtonReleaseEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnRightButtonUp(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(ActiveButton == wxEVT_LEFT_DOWN)
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnLeftButtonUp(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(ActiveButton == wxEVT_MIDDLE_DOWN)
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::MiddleButtonReleaseEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnMiddleButtonUp(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  //if the ActiveButton is realeased, then release mouse capture
-  if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse)
-  {
-    ReleaseMouse();
-  }
-  ActiveButton = wxEVT_NULL;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnMouseWheel(wxMouseEvent& event)
-{
-// Mouse wheel was only added after VTK 4.4 (I think...)
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
-  // new style
-  //Set vtk event information ... The numebr of wheel rotations is stored in
-  //the x varible.  y varible is zero
-  SetEventInformationFlipY(event.GetWheelRotation() / event.GetWheelDelta(), 0, 
-                           event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-  if(event.GetWheelRotation() > 0)
-    {
-      //Send event to VTK
-      InvokeEvent(vtkCommand::MouseWheelForwardEvent, NULL);
-    }
-  else
-    {
-      //Send event to VTK
-      InvokeEvent(vtkCommand::MouseWheelBackwardEvent, NULL);
-    }
-#endif
-    
-}
-
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Render()
-{
-  RenderAllowed = 1;
-  if (!RenderWhenDisabled)
-    {
-    //the user doesn't want us to render when the toplevel frame
-    //is disabled - first find the top level parent
-    wxWindow *topParent = wxGetTopLevelParent(this);
-    if (topParent)
-      {
-      //if it exists, check whether it's enabled
-      //if it's not enabeld, RenderAllowed will be false
-      RenderAllowed = topParent->IsEnabled();
-      }
-    }
-
-  if (RenderAllowed)
-    {
-    if(Handle && (Handle == GetHandleHack()) )
-      {
-      RenderWindow->Render();
-      }
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
-    else if(GetHandleHack())
-      {
-      //this means the user has reparented us; let's adapt to the
-      //new situation by doing the WindowRemap dance
-      //store the new situation
-      Handle = GetHandleHack();
-      RenderWindow->SetNextWindowId(reinterpret_cast<void *>(Handle));
-      RenderWindow->WindowRemap();
-      RenderWindow->Render();
-      }
-#endif
-    }
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::SetRenderWhenDisabled(int newValue)
-{
-  //Change value of __RenderWhenDisabled ivar.
-  //If __RenderWhenDisabled is false (the default), this widget will not
-  //call Render() on the RenderWindow if the top level frame (i.e. the
-  //containing frame) has been disabled.
-
-  //This prevents recursive rendering during wxSafeYield() calls.
-  //wxSafeYield() can be called during the ProgressMethod() callback of
-  //a VTK object to have progress bars and other GUI elements updated -
-  //it does this by disabling all windows (disallowing user-input to
-  //prevent re-entrancy of code) and then handling all outstanding
-  //GUI events.
-        
-  //However, this often triggers an OnPaint() method for wxVTKRWIs,
-  //resulting in a Render(), resulting in Update() being called whilst
-  //still in progress.
-
-  RenderWhenDisabled = (bool)newValue;
-}
-//---------------------------------------------------------------------------
-//
-// Set the variable that indicates that we want a stereo capable window
-// be created. This method can only be called before a window is realized.
-//
-void wxVTKRenderWindowInteractor::SetStereo(int capable)
-{
-  if (Stereo != capable)
-    {
-    Stereo = capable;
-    RenderWindow->StereoCapableWindowOn();
-    RenderWindow->SetStereoTypeToCrystalEyes();
-    Modified();
-    }
-}
-
-//---------------------------------------------------------------------------
-//
-//
-void wxVTKRenderWindowInteractor::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
-
-
-}
-// LG : EO namespace bbwxvtk
-//=======================================================================
-
-
diff --git a/packages/wxvtk/src/wxVTKRenderWindowInteractor.h b/packages/wxvtk/src/wxVTKRenderWindowInteractor.h
deleted file mode 100644 (file)
index 12f33f8..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- #                        pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- #  This software is governed by the CeCILL-B license under French law and
- #  abiding by the rules of distribution of free software. You can  use,
- #  modify and/ or redistribute the software under the terms of the CeCILL-B
- #  license as circulated by CEA, CNRS and INRIA at the following URL
- #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- #  or in the file LICENSE.txt.
- #
- #  As a counterpart to the access to the source code and  rights to copy,
- #  modify and redistribute granted by the license, users are provided only
- #  with a limited warranty  and the software's author,  the holder of the
- #  economic rights,  and the successive licensors  have only  limited
- #  liability.
- #
- #  The fact that you are presently reading this means that you have had
- #  knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
-
-/*=========================================================================
-
-  Program:   Visualization Toolkit
-  Module:    $RCSfile: wxVTKRenderWindowInteractor.h,v $
-  Language:  C++
-  Date:      $Date: 2012/11/16 08:52:36 $
-  Version:   $Revision: 1.4 $
-=========================================================================*/
-
-// .NAME  wxVTKRenderWindowInteractor - class to enable VTK to render to 
-// and interact with wxWindow.
-// .SECTION Description
-//  wxVTKRenderWindowInteractor provide a VTK widget for wxWindow. This class
-// was completely rewrote to have the 'Look & Feel' of the python version:
-// wxVTKRenderWindowInteractor.py
-// .SECTION Caveats 
-//  - There is a know bug that prevent this class to works for more info see 
-// WX_USE_X_CAPTURE. This bug only affect wxGTK from 2.3.2 to wxGTK 2.4.0.
-//  - Furthermore this class is tempated over either wxWindows or wxGLCanvas,
-// in wxWindows 2.3.1 and earlier, the wxGLCanvas had scroll bars, you can avoid
-// this effect by playing with WX_BASE_CLASS at your risk (you might end up with
-// lot of flickering.)
-//  - This class might not be easily readable as it tried to work with VTK 3.2
-//  and 4.x. This class doesn't support reparenting with VTK 4.2 and earlier.
-// .SECTION see also
-// wxVTKRenderWindowInteractor.py wxVTKRenderWindow.py
-
-#ifndef _wxVTKRenderWindowInteractor_h_
-#define _wxVTKRenderWindowInteractor_h_
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#  pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include <wx/wx.h>
-#endif
-
-#include <wx/timer.h>
-#include <wx/dcclient.h>
-
-// vtk includes
-#include "vtkRenderWindowInteractor.h"
-#include "vtkRenderWindow.h"
-
-// Apparently since wxGTK 2.8.0 one can finally use wxWindow (just as in any
-// other port):
-// MM: tested on 2008/04/08: experienced some heavy flickering with wx-widget 2.6.0
-// using a wxWindow instead of wxGLCanvas fixed the symptoms
-//#if (!wxCHECK_VERSION(2, 6, 0))
-#if (!wxCHECK_VERSION(2, 8, 0))
-#define USE_WXGLCANVAS
-#endif
-
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-#  if wxUSE_GLCANVAS
-#    include <wx/glcanvas.h>
-#  else
-#    error "problem of wxGLCanvas, you need to build wxWidgets with opengl"
-#  endif //wxUSE_GLCANVAS
-#endif //__WXGTK__
-
-// Motif version (renamed into wxX11 for wxWindow 2.4 and newer)
-#if defined(__WXMOTIF__) 
-# error This GUI is not supported by wxVTKRenderWindowInteractor for now
-#endif
-
-// wx forward declarations
-class wxPaintEvent;
-class wxMouseEvent;
-class wxTimerEvent;
-class wxKeyEvent;
-class wxSizeEvent;
-
-//=======================================================================
-// LG : NAMESPACE IS NECESSARY TO AVOID CONFLICTING SYMBOLS IN DYN LIBS
-namespace bbwxvtk
-{
-
-
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-class wxVTKRenderWindowInteractor : public wxGLCanvas, public vtkRenderWindowInteractor
-#else
-class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInteractor
-#endif //__WXGTK__
-{
-  DECLARE_DYNAMIC_CLASS(wxVTKRenderWindowInteractor)
-  
-  public:
-    //constructors
-    wxVTKRenderWindowInteractor();
-
-    wxVTKRenderWindowInteractor(wxWindow *parent,
-                                wxWindowID id,
-                                const wxPoint &pos = wxDefaultPosition,
-                                const wxSize &size = wxDefaultSize,
-                                long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
-                                const wxString &name = wxPanelNameStr);
-    vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
-    static wxVTKRenderWindowInteractor * New();
-    void PrintSelf(ostream& os, vtkIndent indent);
-
-         //destructor
-    ~wxVTKRenderWindowInteractor();
-
-    // vtkRenderWindowInteractor overrides
-    void Initialize();
-    void Enable();
-    bool Enable(bool enable);
-    void Disable();
-    void Start();
-    void UpdateSize(int x, int y);
-    int CreateTimer(int timertype);
-    int DestroyTimer();
-    void TerminateApp() {};
-
-    // event handlers
-    void OnPaint(wxPaintEvent &event);
-    void OnEraseBackground (wxEraseEvent& event);
-    void OnMotion(wxMouseEvent &event);
-
-    void OnButtonDown(wxMouseEvent &event);
-    void OnButtonUp(wxMouseEvent &event);
-#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
-    void OnEnter(wxMouseEvent &event);
-    void OnLeave(wxMouseEvent &event);
-    void OnKeyDown(wxKeyEvent &event);
-    void OnKeyUp(wxKeyEvent &event);
-    void OnChar(wxKeyEvent &event);
-#endif
-    void OnTimer(wxTimerEvent &event);
-    void OnSize(wxSizeEvent &event);
-    void OnMouseWheel(wxMouseEvent& event);
-
-    void Render();
-    void SetRenderWhenDisabled(int newValue);
-
-    // Description:
-    // Prescribe that the window be created in a stereo-capable mode. This
-    // method must be called before the window is realized. Default if off.
-    vtkGetMacro(Stereo,int);
-    vtkBooleanMacro(Stereo,int);
-    virtual void SetStereo(int capable);
-
-    // Description:
-    // As CaptureMouse could be a problem sometimes on a window box
-    // This method allow to set or not the CaptureMouse.
-    // This method actually will works only if WX_USE_X_CAPTURE was set to 1
-    vtkSetMacro(UseCaptureMouse,int);
-    vtkBooleanMacro(UseCaptureMouse,int);
-
-  protected:
-    wxTimer timer;
-    int ActiveButton;
-    int RenderAllowed;
-    long GetHandleHack();
-    int Stereo;
-    
-  private:
-    long Handle;
-    bool Created;
-    int RenderWhenDisabled;
-    int UseCaptureMouse;
-
-    DECLARE_EVENT_TABLE()
-};
-
-} 
-// LG : EO namespace bbwxvtk
-//======================================================================
-
-#endif //_wxVTKRenderWindowInteractor_h_
index adf4c66218bbe8a0095bab8e3201f7ae13351eae..0e96065b9a840aacc6934a110fbc50b21cc105e2 100644 (file)
 #include "vtkRenderWindowInteractor.h"
 #include "vtkRenderer.h"
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 vtkCxxRevisionMacro(wxvtkImageViewer2, "$Revision: 1.8 $");
+#else
+  //...
+#endif
+
 vtkStandardNewMacro(wxvtkImageViewer2);
 
 //----------------------------------------------------------------------------
@@ -222,8 +228,15 @@ void wxvtkImageViewer2::GetSliceRange(int &min, int &max)
   vtkImageData *input = this->GetInput();
   if (input)
     {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     input->UpdateInformation();
     int *w_ext = input->GetWholeExtent();
+#else
+    int *w_ext = input->GetExtent();
+#endif
+
     min = w_ext[this->SliceOrientation * 2];
     max = w_ext[this->SliceOrientation * 2 + 1];
     }
@@ -235,8 +248,15 @@ int* wxvtkImageViewer2::GetSliceRange()
   vtkImageData *input = this->GetInput();
   if (input)
     {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     input->UpdateInformation();
+printf("EED Warning wxvtkImageViewer2::GetSliceRange  GetWholeExtent()[2] ??? /n");
     return input->GetWholeExtent() + this->SliceOrientation * 2;
+#else
+printf("EED Warning wxvtkImageViewer2::GetSliceRange  GetExtent()[2] ??? /n");
+    return input->GetExtent() + this->SliceOrientation * 2;
+#endif
     }
   return NULL;
 }
@@ -359,7 +379,7 @@ void wxvtkImageViewer2::UpdateOrientation()
                          cam->SetFocalPoint(0,0,0);
                        break;
       }
-       
+
 /*             
                switch (this->SliceOrientation)
                {
@@ -398,8 +418,13 @@ void wxvtkImageViewer2::UpdateDisplayExtent()
     }
 
   //  std::cout << "--- wxvtkImageViewer2::UpdateDisplayExtent()"<<std::endl;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   input->UpdateInformation();
   int *w_ext = input->GetWholeExtent();
+#else
+  int *w_ext = input->GetExtent();
+#endif
 
   //   std::cout << "ext = "
   //   <<w_ext[0]<<" - "<<w_ext[1]<<" ; "
@@ -443,9 +468,7 @@ void wxvtkImageViewer2::UpdateDisplayExtent()
         this->InteractorStyle->GetAutoAdjustCameraClippingRange())
       {
       this->Renderer->ResetCameraClippingRange();
-      }
-    else
-      {
+      } else {
       vtkCamera *cam = this->Renderer->GetActiveCamera();
       if (cam)
         {
@@ -460,9 +483,9 @@ void wxvtkImageViewer2::UpdateDisplayExtent()
          spacing[2]; // JPR??
         cam->SetClippingRange(
           range - avg_spacing * 3.0, range + avg_spacing * 3.0);
-        }
-      }
-    }
+        } // if cam
+      } // if InteractorStyle
+    } // if Renderer
 }
 
 //----------------------------------------------------------------------------
@@ -538,10 +561,17 @@ public:
 
       if (event == vtkCommand::ResetWindowLevelEvent)
         {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         this->IV->GetInput()->UpdateInformation();
         this->IV->GetInput()->SetUpdateExtent
           (this->IV->GetInput()->GetWholeExtent());
         this->IV->GetInput()->Update();
+#else
+  //...
+#endif
+
         double *range = this->IV->GetInput()->GetScalarRange();
         this->IV->SetColorWindow(range[1] - range[0]);
         this->IV->SetColorLevel(0.5 * (range[1] + range[0]));
@@ -668,7 +698,13 @@ void wxvtkImageViewer2::InstallPipeline()
 
   if (this->ImageActor && this->WindowLevel)
     {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     this->ImageActor->SetInput(this->WindowLevel->GetOutput());
+#else
+       this->WindowLevel->Update();
+    this->ImageActor->SetInputData(this->WindowLevel->GetOutput());
+#endif
     }
 }
 
@@ -677,7 +713,12 @@ void wxvtkImageViewer2::UnInstallPipeline()
 {
   if (this->ImageActor)
     {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     this->ImageActor->SetInput(NULL);
+#else
+    this->ImageActor->SetInputData(NULL);
+#endif
     }
 
   if (this->Renderer && this->ImageActor)
@@ -709,8 +750,15 @@ void wxvtkImageViewer2::Render()
        input)
       {
 
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
       input->UpdateInformation();
       int *w_ext = input->GetWholeExtent();
+#else
+      int *w_ext = input->GetExtent();
+#endif
+
       int xs = 0, ys = 0;
 
       //       std::cout << "wxvtkImageViewer2::Render ext = "
@@ -784,7 +832,13 @@ int wxvtkImageViewer2::GetOffScreenRendering()
 void wxvtkImageViewer2::SetInput(vtkImageData *in)
 {
   //  std::cout << "### wxvtkImageViewer2::SetInput"<<std::endl;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   this->WindowLevel->SetInput(in);
+#else
+  this->WindowLevel->SetInputData(in);
+#endif
+
   this->UpdateDisplayExtent();
   // LG 03/12/08
   //  FirstRender = 1;
index ff097bd36d186db26cc91562fef737dc5935bbea..47867584fb5103009e0fe3cf340f5cbf6db663d7 100644 (file)
@@ -96,7 +96,14 @@ class /*VTK_RENDERING_EXPORT*/ wxvtkImageViewer2 : public vtkObject
 {
 public:
   static wxvtkImageViewer2 *New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   vtkTypeRevisionMacro(wxvtkImageViewer2,vtkObject);
+#else
+  vtkTypeMacro(wxvtkImageViewer2,vtkObject);
+#endif
+
   void PrintSelf(ostream& os, vtkIndent indent);
 
   // Description:
@@ -157,7 +164,9 @@ public:
   virtual int GetSliceMin();
   virtual int GetSliceMax();
   virtual void GetSliceRange(int range[2])
-    { this->GetSliceRange(range[0], range[1]); }
+       { 
+               this->GetSliceRange(range[0], range[1]); 
+       }
   virtual void GetSliceRange(int &min, int &max);
   virtual int* GetSliceRange();
   
@@ -178,7 +187,10 @@ public:
   // Set/Get the position in screen coordinates of the rendering window.
   virtual int* GetPosition();
   virtual void SetPosition(int a,int b);
-  virtual void SetPosition(int a[2]) { this->SetPosition(a[0],a[1]); }
+  virtual void SetPosition(int a[2]) 
+       { 
+               this->SetPosition(a[0],a[1]); 
+       }
   
   // Description:
   // Set/Get the size of the window in screen coordinates in pixels.