]> Creatis software - bbtk.git/commitdiff
Merge remote-tracking branch 'origin/changestoITK3and4' into vtk7itk4wx3
authorEduardo DAVILA <davila@localhost.localdomain>
Tue, 3 Oct 2017 13:39:43 +0000 (15:39 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Tue, 3 Oct 2017 13:39:43 +0000 (15:39 +0200)
150 files changed:
kernel/cmake/BBTKConfigurePackage_data.cmake
kernel/src/bbtkVtkBlackBoxMacros.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/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/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/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/wxVTKRenderWindowInteractor.cxx
packages/wxvtk/src/wxVTKRenderWindowInteractor.h
packages/wxvtk/src/wxvtkImageViewer2.cxx
packages/wxvtk/src/wxvtkImageViewer2.h

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 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                                                                         
+
+
 //===========================================================================
 
 //===========================================================================
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 197ed037997da829b0de5672b6af03575e0bc767..c1d16ba58fb15afc84ccce9badb0f3705362fa51 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;
@@ -106,7 +113,9 @@ void GetXCoherentInfoGdcmReader::Process()
    f->GetImageOrientationPatient(iop);
    
    for(i=0; i< 6; i++)
+       {
       v_iop.push_back(iop[i]);
+       } // for i
    bbSetOutputIOP(v_iop );
  
    std::vector<double> v_ipp;
@@ -114,7 +123,9 @@ void GetXCoherentInfoGdcmReader::Process()
    f->GetImagePositionPatient(ipp);
    
    for(i=0; i< 3; i++)
+       {
       v_ipp.push_back(ipp[i]);
+       } // for i
    bbSetOutputIPP(v_ipp );
 
 // Add *all the files* to the SerieHelper
@@ -126,7 +137,7 @@ void GetXCoherentInfoGdcmReader::Process()
                                         ++it)
    {
       sh->AddFileName(*it);
-   }
+   } //for vector
 
 
    GDCM_NAME_SPACE::FileList::const_iterator it;
@@ -136,10 +147,10 @@ void GetXCoherentInfoGdcmReader::Process()
    l = sh->GetFirstSingleSerieUIDFileSet();
 
    int nbFiles;
-   double zspacing = 0.;
-   nbFiles = l->size() ;
+   double zspacing     = 0.;
+   nbFiles                     = l->size() ;
    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() );
@@ -148,21 +159,20 @@ void GetXCoherentInfoGdcmReader::Process()
 //      v_pixelspacing.push_back(f->GetZSpacing());
 //   }
    bbSetOutputPixelSpacing(v_pixelspacing);
-
    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();
+
+printf("EED GetXCoherentInfoGdcmReader::Process \n");
    bbSetOutputOut( reader->GetOutput() );
 }
 #endif
@@ -195,7 +205,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;
@@ -203,8 +215,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
@@ -264,11 +278,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
 
@@ -276,7 +296,9 @@ void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
 void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
 {
    if(reader)
+       {
       reader->Delete();
+       }
 }
 #endif
 
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 074e9de8a37d013d7a1f10b8ae6963035ab529ff..cb9d77bf0d920e156f4de703db005274e643e7f3 100644 (file)
@@ -53,13 +53,10 @@ void CreateImage::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
-       
-
        double  spc[6];
        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
@@ -84,7 +81,6 @@ void CreateImage::Process()
        else if (bbGetInputOutputFormat()=="MET_DOUBLE")                        outputformat = VTK_DOUBLE;              // 11  
 
 
-
        spc[0] = bbGetInputSpacing()[0];
        spc[1] = bbGetInputSpacing()[1];
        spc[2] = bbGetInputSpacing()[2];
@@ -94,37 +90,50 @@ void CreateImage::Process()
        dim[2] =  bbGetInputDimensions()[2];
        
        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() );
-               }
-               
-               sizeBlock= dim[0] * imageoutput->GetScalarSize();
-                for (j=1; j<dim[1]; j++)
-               {
-                       memcpy(  imageoutput->GetScalarPointer(0,j,0), imageoutput->GetScalarPointer()  , sizeBlock );
-               }               
-
-               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
-
-               imageoutput->Update();
-               imageoutput->Modified();
-               bbSetOutputOut(imageoutput);
-
+       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++)
+       {
+               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 c74a6ec2462f96bf76803d200e51c697be995f48..e947bb36046a60fc60f98339f0f070825d5a1b6f 100644 (file)
@@ -46,7 +46,14 @@ void ImageBoundaries::Process()
                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 92476f5e19b8a01a00719c3c671d8a3063169404..6f2808219c3faf75f60d7a828e03adbe58aedaca 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] ); 
@@ -284,7 +316,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;
@@ -304,7 +343,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);
 
@@ -312,11 +358,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);
 
@@ -347,9 +407,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();
@@ -390,7 +456,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);      
@@ -400,7 +474,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){
                                _imageReslicer = vtkImageReslice::New();                                        
@@ -409,15 +491,34 @@ namespace bbvtk
                                _matrix = vtkMatrix4x4::New();  
                        }
                        _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 f9d8b7d1c958362386a3b0471ae5ed9537e621a1..50506435bc6026d0c686b66b98c97fd684551874 100644 (file)
@@ -53,9 +53,16 @@ void ImageVtkProperties::Process()
        if ( bbGetInputIn() )
        {
                bbGetInputIn()->Modified();
-               bbGetInputIn()->Update();
                
+//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 97963bca7327d6d4f3edc07a6ac10e4ba8019d7f..8581943820eb2e983ad2861975efcda79f2223cb 100644 (file)
@@ -34,7 +34,13 @@ void InversCrop::Process()
        int dim[3];
        int ext[6];
        
+//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;
@@ -43,10 +49,16 @@ void InversCrop::Process()
        {
                _imageoutput = vtkImageData::New();
                _imageoutput->Initialize();
-               _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
                _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)
        {
@@ -62,7 +74,14 @@ void InversCrop::Process()
        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;
index c1bf38d3f63b646b805dc302288c95191ac7ac9f..b65e51d22893d90ba8a461a1a5044b6052be254f 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,21 @@ namespace bbvtk
        bbSetInputOpacityValues(opaValues);
        bbSetInputMinColorWindow(0.0);
        bbSetInputMaxColorWindow(255.0);
-
-       opacityTransferFunction = vtkPiecewiseFunction::New();
-       grayTransferFunction = vtkPiecewiseFunction::New();
-
+       opacityTransferFunction         = vtkPiecewiseFunction::New();
+       grayTransferFunction    = vtkPiecewiseFunction::New();
           mCast        = NULL;
           mMIP         = NULL;
           mMapper      = NULL;
           mVolume      = NULL;
-
-
    }
+
        //---------------------------------------------------------------------
    void MIPCreator::bbUserInitializeProcessing()
    {
-
-
     // Create the pipeline
     mCast = vtkImageShiftScale::New();
     mCast->SetOutputScalarTypeToUnsignedChar();
     mCast->ClampOverflowOn();
-
-
 }
 
 //---------------------------------------------------------------------
@@ -120,62 +110,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 +159,36 @@ 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);
-
-
-
-
-
         mMIP = vtkVolumeRayCastMIPFunction::New();
         mMIP->SetMaximizeMethodToScalarValue();
-
         mMapper = vtkVolumeRayCastMapper::New();
         mMapper->SetVolumeRayCastFunction(mMIP);
+               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 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 58852e83ed9df71d7b01f60835d83c4e7aff505b..0a2fdfdb24074331ed862707a18e2c28901bfb3b 100644 (file)
@@ -110,7 +110,13 @@ namespace bbvtk
 
                if (bbGetInputActive()==true)
                {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                         polydatamapper->SetInput( bbGetInputIn() );
+#else
+                        polydatamapper->SetInputData( bbGetInputIn() );
+#endif
+
                         vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
                         vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
                           
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 2088b4843ffc1bce5ed8a1f222fbb5de44067203..4e82b55862039db015962fc5b20292ff2c4d69ad 100755 (executable)
@@ -67,10 +67,15 @@ void SliceImage::Process()
                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
 
        }
 
@@ -140,7 +145,13 @@ void SliceImage::Process()
        }
 
        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 3e0f81ac70694ef2f423c9c700611b9aba5b628f..119e612c470e8630de8e844c686f7280e5308094 100644 (file)
@@ -33,7 +33,6 @@ void SurfaceTexture::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
   
-printf("EED SurfaceTexture::Process Start\n");
 
        int i;
        double spc[3];
@@ -41,7 +40,15 @@ printf("EED SurfaceTexture::Process Start\n");
        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..a3b39a5a2d17611513f6b40418fe53348e033ad2 100644 (file)
@@ -126,7 +126,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;
     }
 
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..23cd7d2dbec6325ecb4ac5c00f41952025a20bc0 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 "wxVTKRenderWindowInteractor.h"
+
 namespace bbwxvtk
 {
   //--------------------------------------------------------------------------
@@ -62,22 +74,28 @@ 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;
+    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;
     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),
@@ -88,7 +106,13 @@ namespace bbwxvtk
     wxvtkrenderwindowinteractor = new 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 +123,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 +197,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 +293,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 +309,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 +348,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 +412,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..8400ae0fd23ba58368c5b810da4f5f5f8683bcd6 100644 (file)
 #define __bbwxvtkViewer2D_h__
 
 #include "vtkImageData.h"
-#include "wxvtkImageViewer2.h"
 #include "vtkImplicitPlaneWidget.h"
 
 #include "bbtkWxBlackBox.h"
-#include "wxVTKRenderWindowInteractor.h"
 
 namespace bbwxvtk
 {
index ea44bbbf1f74549e6e89b8b8dca9ed3d8692e5e7..2e58ec634d418100a745519632c075d2c0200372 100644 (file)
@@ -160,7 +160,15 @@ BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxWindow)
   EVT_SIZE        (wxVTKRenderWindowInteractor::OnSize)
 END_EVENT_TABLE()
 
-vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+  vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+#else
+  //...
+#endif
+
 vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor)
 
 //---------------------------------------------------------------------------
@@ -185,9 +193,12 @@ wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxWindow(), vtkRend
 #ifdef VTK_DEBUG_LEAKS
   vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
 #endif
+
   this->RenderWindow = NULL;
   this->SetRenderWindow(vtkRenderWindow::New());
   this->RenderWindow->Delete();
+  this->SetBackgroundStyle( wxBG_STYLE_COLOUR );
+  this->SetBackgroundColour( wxColor(0,0,0,0) );
 }
 //---------------------------------------------------------------------------
 wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor(wxWindow *parent,
@@ -221,6 +232,8 @@ wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor(wxWindow *parent,
   // so we update the size information of the interactor/renderwindow here
   this->UpdateSize(size.x, size.y);
 #endif
+  this->SetBackgroundStyle( wxBG_STYLE_COLOUR );
+  this->SetBackgroundColour( wxColor(0,0,0,0) );
 }
 //---------------------------------------------------------------------------
 wxVTKRenderWindowInteractor::~wxVTKRenderWindowInteractor()
@@ -303,15 +316,17 @@ void wxVTKRenderWindowInteractor::UpdateSize(int x, int y)
       Size[1] = y;
       // and our RenderWindow's size
       RenderWindow->SetSize(x, y);
-    }
-  }
+    } // if x y
+  } // if RenderWindow
 }
 //---------------------------------------------------------------------------
 int wxVTKRenderWindowInteractor::CreateTimer(int WXUNUSED(timertype))
 {
   // it's a one shot timer
   if (!timer.Start(10, TRUE))
-    assert(false);
+       {
+       assert(false);
+       }
 
   return 1;
   
@@ -325,9 +340,11 @@ int wxVTKRenderWindowInteractor::DestroyTimer()
 //---------------------------------------------------------------------------
 void wxVTKRenderWindowInteractor::OnTimer(wxTimerEvent& WXUNUSED(event))
 {
-  if (!Enabled)
-    return;
-    
+       if (!Enabled)
+       {
+           return;
+    }
+
 #if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
     // new style
     InvokeEvent(vtkCommand::TimerEvent, NULL);
@@ -409,6 +426,7 @@ void wxVTKRenderWindowInteractor::OnPaint(wxPaintEvent& WXUNUSED(event))
     rwin->UpdateGLRegion();
   }
 #endif
+
 }
 //---------------------------------------------------------------------------
 void wxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)
@@ -437,18 +455,17 @@ void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent& WXUNUSED(event))
 //---------------------------------------------------------------------------
 void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
 {
- if (!Enabled) 
+       this->Render();
+
+       if (!Enabled) 
     {
-    return;
+       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);
-
+  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);
+  InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(), event.GetX(), Size[1] - event.GetY() - 1);
 #endif
 }
 //---------------------------------------------------------------------------
@@ -462,14 +479,11 @@ void wxVTKRenderWindowInteractor::OnEnter(wxMouseEvent &event)
 
 #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);
-
+  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);  
+  InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(), event.GetX(), Size[1] - event.GetY() - 1);  
 #endif
 }
 //---------------------------------------------------------------------------
index 12f33f88b272156d3ebb14bed6576f387548c589..2487c23594e7ddb79dcf52e4d799cfc474268381 100644 (file)
@@ -127,7 +127,14 @@ class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInter
                                 const wxSize &size = wxDefaultSize,
                                 long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
                                 const wxString &name = wxPanelNameStr);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
+#else
+    vtkTypeMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
+#endif
+
     static wxVTKRenderWindowInteractor * New();
     void PrintSelf(ostream& os, vtkIndent indent);
 
@@ -141,8 +148,8 @@ class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInter
     void Disable();
     void Start();
     void UpdateSize(int x, int y);
-    int CreateTimer(int timertype);
-    int DestroyTimer();
+    int  CreateTimer(int timertype);
+    int  DestroyTimer();
     void TerminateApp() {};
 
     // event handlers
@@ -181,17 +188,17 @@ class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInter
     vtkBooleanMacro(UseCaptureMouse,int);
 
   protected:
-    wxTimer timer;
-    int ActiveButton;
-    int RenderAllowed;
-    long GetHandleHack();
-    int Stereo;
+    wxTimer    timer;
+    int        ActiveButton;
+    int                RenderAllowed;
+    long       GetHandleHack();
+    int        Stereo;
     
   private:
-    long Handle;
-    bool Created;
-    int RenderWhenDisabled;
-    int UseCaptureMouse;
+    long       Handle;
+    bool       Created;
+    int        RenderWhenDisabled;
+    int        UseCaptureMouse;
 
     DECLARE_EVENT_TABLE()
 };
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.