]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Wed, 19 Mar 2008 13:30:18 +0000 (13:30 +0000)
committerguigues <guigues>
Wed, 19 Mar 2008 13:30:18 +0000 (13:30 +0000)
kernel/cmake/BBTKConfigurePackage_data.cmake
packages/vtk/src/bbvtkIsoSurfaceExtractor.cxx
packages/vtk/src/bbvtkIsoSurfaceExtractor.h
packages/vtk/src/bbvtkMIPCreator.cxx [new file with mode: 0644]
packages/vtk/src/bbvtkMIPCreator.h [new file with mode: 0644]
packages/wxvtk/bbs/appli/ExampleMIPWithControls.bbs [new file with mode: 0644]
packages/wxvtk/bbs/boxes/bbMIPWithControls.bbs [new file with mode: 0644]
packages/wxvtk/src/bbwxvtkMIPViewer.cxx [deleted file]
packages/wxvtk/src/bbwxvtkMIPViewer.h [deleted file]
packages/wxvtk/src/bbwxvtkViewer3D.h

index a0fcab65b9d29bbddfda6af6799034a98edd8831..12e8ad6fb239ebea0c8b7d15bbbb2303e3cd1d29 100644 (file)
@@ -4,24 +4,25 @@ FILE(GLOB_RECURSE ALL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.*")
 # TO DO : REMOVE CMakeLists.txt FROM LIST !!!
 
 FOREACH(file ${ALL})
-       set(ok "true")
-
-       IF( ${file} STREQUAL "CMakeLists.txt")
-               set(ok "false")
-       ENDIF( ${file} STREQUAL "CMakeLists.txt")
+  set(ok "true")
+  
+  IF( ${file} STREQUAL "CMakeLists.txt")
+    set(ok "false")
+  ENDIF( ${file} STREQUAL "CMakeLists.txt")
+  
+  IF(${ok} STREQUAL "true" )
+    CONFIGURE_FILE(
+      ${CMAKE_CURRENT_SOURCE_DIR}/${file}
+      ${BBTK_DATA_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${file}
+      COPYONLY IMMEDIATE
+      )
+    ###### This mecanism is maded at the end of th system..#####
+    #INSTALL(  
+    #  FILES ${file}
+    #  DESTINATION ${BBTK_DATA_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${file}
+    #) 
+  ENDIF(${ok} STREQUAL "true" )
 
-       IF(${ok} STREQUAL "true" )
-               CONFIGURE_FILE(
-                       ${CMAKE_CURRENT_SOURCE_DIR}/${file}
-                       ${BBTK_DATA_BUILD_PATH}/${BBTK_PACKAGE_NAME}/${file}
-                       COPYONLY IMMEDIATE
-               )
-               ###### This mecanism is maded at the end of th system..#####
-               #INSTALL(  
-               #  FILES ${file}
-               #  DESTINATION ${BBTK_DATA_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${file}
-               #) 
-       ENDIF(${ok} STREQUAL "true" )
 ENDFOREACH(file ${ALL})
   
   
index e4bbc81577a1ffd08ae0fc13dc60c882e3ff7aef..782c00efc2e8c01d25bd9350570b527b11301aca 100644 (file)
@@ -4,8 +4,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkIsoSurfaceExtractor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/03 14:10:03 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/03/19 13:30:18 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -54,8 +54,8 @@ namespace bbvtk
      firsttime=true;
 
          bbSetInputIn(NULL);
-     bbSetInputInVtkObject(NULL);
-     bbSetInputRenderer(NULL);
+         //     bbSetInputInVtkObject(NULL);
+         //     bbSetInputRenderer(NULL);
      bbSetInputIsovalue(400);
      bbSetInputOpacity(1);
         
@@ -94,12 +94,13 @@ namespace bbvtk
      bbSetOutputOut( vtkactor );
      
      // Interface Update
-     
+     /* 
      if ((firsttime==true) && (bbGetInputRenderer()!=NULL ))
        {
         firsttime=false;
         bbGetInputRenderer()->AddActor( vtkactor );
        }
+     */
    }
 } // EO namespace bbtk
 
index d3b51a9f8959b69e6290e6248b8f93c48cbfdc6d..71b8f1a2d4b2d13eb9dd0c676f7f7c5c3f9ddbf1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkIsoSurfaceExtractor.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/03 14:10:03 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/03/19 13:30:18 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -62,11 +62,11 @@ namespace bbvtk
     BBTK_USER_BLACK_BOX_INTERFACE(IsoSurfaceExtractor,bbtk::AtomicBlackBox);
     
     BBTK_DECLARE_INPUT(In,vtkImageData *);
-    BBTK_DECLARE_INPUT(InVtkObject,vtkObject *);
+    //    BBTK_DECLARE_INPUT(InVtkObject,vtkObject *);
     BBTK_DECLARE_INPUT(Isovalue,double);
     BBTK_DECLARE_INPUT(Opacity,double);
     BBTK_DECLARE_INPUT(Colour,std::vector<double>);
-    BBTK_DECLARE_INPUT(Renderer,vtkRenderer *);
+    //    BBTK_DECLARE_INPUT(Renderer,vtkRenderer *);
     BBTK_DECLARE_OUTPUT(Out,vtkProp3D *);
     
     BBTK_PROCESS(DoProcess);
@@ -83,12 +83,13 @@ namespace bbvtk
   BBTK_AUTHOR("eduardo.davila / laurent.guigues at creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("Extracts an iso-surface of a 3D image and creates a vtkProp3D object to insert into a 3D scene (e.g. a Viewer3D)");
   typedef std::vector<double> vectorcolour;
+  BBTK_CATEGORY("3D object creator");
   BBTK_INPUT(IsoSurfaceExtractor,In,"Input image",vtkImageData*);
-  BBTK_INPUT(IsoSurfaceExtractor,InVtkObject,"Image vtkObject",vtkObject*);
+  //  BBTK_INPUT(IsoSurfaceExtractor,InVtkObject,"Image vtkObject",vtkObject*);
   BBTK_INPUT(IsoSurfaceExtractor,Isovalue,"Isovalue",double);
   BBTK_INPUT(IsoSurfaceExtractor,Opacity,"Opacity",double);
   BBTK_INPUT(IsoSurfaceExtractor,Colour,"r g b",vectorcolour);
-  BBTK_INPUT(IsoSurfaceExtractor,Renderer,"3D scene in which to insert the surface",vtkRenderer*);
+  //  BBTK_INPUT(IsoSurfaceExtractor,Renderer,"3D scene in which to insert the surface",vtkRenderer*);
   BBTK_OUTPUT(IsoSurfaceExtractor,Out,"Extracted iso-surface",vtkProp3D *);
   
   BBTK_END_DESCRIBE_BLACK_BOX(IsoSurfaceExtractor);
diff --git a/packages/vtk/src/bbvtkMIPCreator.cxx b/packages/vtk/src/bbvtkMIPCreator.cxx
new file mode 100644 (file)
index 0000000..708d194
--- /dev/null
@@ -0,0 +1,94 @@
+/*=========================================================================
+                                                                                
+  Program:   bbtk
+  Module:    $RCSfile: bbvtkMIPCreator.cxx,v $
+  Language:  C++
+  Date:      $Date: 2008/03/19 13:30:18 $
+  Version:   $Revision: 1.1 $
+                                                                                
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
+/**
+ *  \file 
+ *  \brief 
+ */
+
+
+
+#ifdef _USE_VTK_
+
+
+#include "bbvtkMIPCreator.h"
+#include "bbvtkPackage.h"
+
+namespace bbvtk
+{
+
+
+   BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,MIPCreator)
+   BBTK_USER_BLACK_BOX_IMPLEMENTATION(MIPCreator,bbtk::AtomicBlackBox);
+
+
+
+
+
+   void MIPCreator::bbUserConstructor() 
+   { 
+     Init();
+     bbSetInputShift(0);
+     bbSetInputScale(1.);
+   }
+   void MIPCreator::bbUserCopyConstructor() 
+   { 
+     Init();
+   }
+
+   void MIPCreator::Init() 
+   { 
+
+    // Create the pipeline
+    mCast = vtkImageShiftScale::New();
+    mCast->SetOutputScalarTypeToUnsignedChar();
+    mCast->ClampOverflowOn();
+    
+    mMIP = vtkVolumeRayCastMIPFunction::New();
+    mMIP->SetMaximizeMethodToScalarValue();
+    
+    mMapper = vtkVolumeRayCastMapper::New();
+    mMapper->SetVolumeRayCastFunction(mMIP);
+    mMapper->SetInput(mCast->GetOutput()); // (smoother.GetOutput())
+    
+    mVolume = vtkVolume::New();
+    mVolume->SetMapper(mMapper);
+
+    //  mMapper->ScalarVisibilityOff();
+    //    mMapper->ImmediateModeRenderingOn();
+
+    bbSetOutputOut(mVolume);
+}
+
+//---------------------------------------------------------------------
+
+   void MIPCreator::Process()
+   {
+     mCast->SetInput( bbGetInputIn() );
+     mCast->SetScale( bbGetInputScale() / 100. );
+     mCast->SetShift( -bbGetInputShift() );
+
+     mMapper->Update();
+     
+     //     mVolume->GetProperty()->SetColor( bbGetInputColour()[0],  bbGetInputColour()[1], bbGetInputColour()[2] );
+     //     mVolume->GetProperty()->SetOpacity( bbGetInputOpacity() );
+     
+   }
+}//namespace bbtk
+
+#endif // _USE_VTK_
+
diff --git a/packages/vtk/src/bbvtkMIPCreator.h b/packages/vtk/src/bbvtkMIPCreator.h
new file mode 100644 (file)
index 0000000..3d1bd4a
--- /dev/null
@@ -0,0 +1,97 @@
+/*=========================================================================
+                                                                                
+  Program:   bbtk
+  Module:    $RCSfile: bbvtkMIPCreator.h,v $
+  Language:  C++
+  Date:      $Date: 2008/03/19 13:30:18 $
+  Version:   $Revision: 1.1 $
+                                                                                
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*//**
+ * \brief Short description in one line
+ * 
+ * Long description which 
+ * can span multiple lines
+ */
+/**
+ * \file 
+ * \brief Pattern for the definition of a new type of Node (header)
+ */
+/**
+ * \class bbtk::NodePatern 
+ * \brief Pattern for the definition of a new type of Node 
+ */
+
+
+#ifdef _USE_VTK_
+
+
+#ifndef __bbvtkMIPCreator_h_INCLUDED__
+#define __bbvtkMIPCreator_h_INCLUDED__
+
+
+#include "bbtkAtomicBlackBox.h"
+
+#include "vtkImageData.h"
+#include <vtkImageShiftScale.h>
+#include <vtkVolumeRayCastMIPFunction.h>
+#include <vtkVolumeRayCastMapper.h>
+#include "vtkProp3D.h"
+#include "vtkVolume.h"
+
+namespace bbvtk
+{
+
+
+  
+  class /*BBTK_EXPORT*/ MIPCreator : public bbtk::AtomicBlackBox
+  { 
+  public:
+    BBTK_USER_BLACK_BOX_INTERFACE(MIPCreator,bbtk::AtomicBlackBox);
+    //    BBTK_DECLARE_INPUT(Contour,int);
+    BBTK_DECLARE_INPUT(In,vtkImageData *);
+    BBTK_DECLARE_INPUT(Shift,int);
+    BBTK_DECLARE_INPUT(Scale,float);
+    BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
+    BBTK_PROCESS(Process);
+    void Process();
+    
+  protected:
+    virtual void bbUserConstructor();
+    virtual void bbUserCopyConstructor();
+    void Init();
+  private:
+    vtkImageShiftScale* mCast;
+    vtkVolumeRayCastMIPFunction* mMIP;
+    vtkVolumeRayCastMapper* mMapper;
+    vtkVolume* mVolume;
+  };
+   
+  //=================================================================
+  // UserBlackBox description
+  BBTK_BEGIN_DESCRIBE_BLACK_BOX(MIPCreator,bbtk::AtomicBlackBox);
+  BBTK_NAME("MIPCreator");
+  BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
+  BBTK_DESCRIPTION("Creates a Maximum Intensity Projection (MIP) view of a 3D image. Creates a vtkProp3D object to insert into a 3D scene (e.g. a Viewer3D)");
+  BBTK_CATEGORY("3D object creator");
+  BBTK_INPUT(MIPCreator,Shift,"Gray scale shift",int);
+  BBTK_INPUT(MIPCreator,Scale,"Gray scale scaling",float);
+  BBTK_INPUT(MIPCreator,In,"Input Image",vtkImageData *);
+  BBTK_OUTPUT(MIPCreator,Out,"MIP object to plug into a 3D viewer",vtkProp3D*);
+  BBTK_END_DESCRIBE_BLACK_BOX(MIPCreator);
+  //=================================================================
+
+
+}//namespace bbvtk
+
+#endif  //__bbtvtkMIPCreator_h__
+
+#endif //_USE_VTK_
+
diff --git a/packages/wxvtk/bbs/appli/ExampleMIPWithControls.bbs b/packages/wxvtk/bbs/appli/ExampleMIPWithControls.bbs
new file mode 100644 (file)
index 0000000..a49a021
--- /dev/null
@@ -0,0 +1,28 @@
+description "Example of MIPWithControls."
+author "laurent.guigues at creatis.insa-lyon.fr"
+category "example"
+
+include wxvtk/boxes/bbMIPWithControls
+include vtk/boxes/bbLoadHola
+new MIPWithControls MIP
+
+load wxvtk
+new Viewer3D viewer
+new LoadHola image
+
+connect image.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"
+
+set main.title "ExampleMIPWithControls"
+exec main
diff --git a/packages/wxvtk/bbs/boxes/bbMIPWithControls.bbs b/packages/wxvtk/bbs/boxes/bbMIPWithControls.bbs
new file mode 100644 (file)
index 0000000..6a74e58
--- /dev/null
@@ -0,0 +1,67 @@
+load wx
+load vtk
+load std
+
+define MIPWithControls
+  author "laurent.guigues@creatis.insa-lyon.fr"
+  description "Maximum Intensity Projection (MIP) creator (vtk::MIPCreator) with associated control panel (shift and scale)"
+  category "image;mesh;widget;viewer"
+
+  new LayoutLine controls
+  new LayoutLine sliders
+  new MIPCreator MIP
+  new Slider shift
+  new Slider scale
+#  new LayoutLine colourFrame
+#  new ColourSelectorButton colour
+  new MultipleInputs refresh  
+  new Div div
+
+  connect sliders.Widget controls.Widget1
+#  connect colourFrame.Widget controls.Widget2
+
+#  connect colour.Widget colourFrame.Widget1
+  connect shift.Widget sliders.Widget1
+  connect scale.Widget sliders.Widget2
+  
+  connect shift.Out MIP.Shift
+  connect scale.Out div.In1
+  set div.In2 10
+  connect div.Out MIP.Scale
+#  connect colour.Out MIP.Colour
+
+  connect shift.BoxChange refresh.In1
+  connect scale.BoxChange refresh.In2
+#  connect colour.BoxChange refresh.In3
+
+#  connect colourButton.BoxChange colour.BoxExecute
+
+#  set colourFrame.WinTitle "Colour"
+  set controls.Orientation HORIZONTAL
+  set shift.Title "Shift"
+  set shift.Min 0
+  set shift.Max 500
+  set scale.Title "Scale x10"
+  set scale.Min 0
+  set scale.Max 500
+  set scale.In 10
+#  set colourButton.Label "Colour"
+
+
+  input Title controls.WinTitle "Title of the control panel" 
+  input In MIP.In "Input image"
+
+  input Scale scale.In "Initial scale"
+  input Shift shift.In "Initial shift"
+#  input Colour colour.In "Initial colour"
+
+  input BoxExecute MIP.BoxExecute "Box execution"
+
+  input Vertical controls.Orientation "Set to 1 to have controls arranged vertically"
+
+  output Out MIP.Out "Output MIP"
+  output BoxChange refresh.Out "BoxChange" 
+  output Widget controls.Widget "Widget"
+
+endefine
diff --git a/packages/wxvtk/src/bbwxvtkMIPViewer.cxx b/packages/wxvtk/src/bbwxvtkMIPViewer.cxx
deleted file mode 100644 (file)
index 3ea04c0..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/*=========================================================================
-                                                                                
-  Program:   bbtk
-  Module:    $RCSfile: bbwxvtkMIPViewer.cxx,v $
-  Language:  C++
-  Date:      $Date: 2008/03/03 13:14:27 $
-  Version:   $Revision: 1.1 $
-                                                                                
-  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
-  l'Image). All rights reserved. See Doc/License.txt or
-  http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
-                                                                                
-     This software is distributed WITHOUT ANY WARRANTY; without even
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE.  See the above copyright notices for more information.
-                                                                                
-=========================================================================*/
-/**
- *  \file 
- *  \brief 
- */
-
-
-
-#ifdef _USE_WXWIDGETS_
-
-
-#include "bbwxvtkMIPViewer.h"
-#include "bbwxvtkPackage.h"
-//#include <wx/dialog.h>
-
-#include "vtkInteractorStyleImage.h"
-#include "vtkCamera.h"
-#include "vtkRenderer.h"
-
-
-
-namespace bbwxvtk
-{
-
-  BBTK_ADD_BLACK_BOX_TO_PACKAGE(wxvtk,MIPViewer);
-  
-
-  MIPViewerWidget::MIPViewerWidget(MIPViewer* v, wxWindow *parent)
-    :    
-    wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL),
-    mBox(v)
-  {
-    wxPanel *panel     = this;
-    
-    mImageData   = NULL;
-    
-    // Create the pipeline
-    mCast = vtkImageShiftScale::New();
-    mCast->SetOutputScalarTypeToUnsignedChar();
-    mCast->ClampOverflowOn();
-    
-    mMIP = vtkVolumeRayCastMIPFunction::New();
-    mMIP->SetMaximizeMethodToScalarValue();
-    
-    mMapper = vtkVolumeRayCastMapper::New();
-    mMapper->SetVolumeRayCastFunction(mMIP);
-    mMapper->SetInput(mCast->GetOutput()); // (smoother.GetOutput())
-    
-    
-    // Actor
-    mActor = vtkVolume::New();
-    mActor->SetMapper(mMapper);
-    
-    // Pipeline Viewer
-    // Camera
-    mCamera = vtkCamera::New();
-    mCamera->SetViewUp(0, 0, -1);
-    mCamera->SetPosition(0, 1, 0);
-    mCamera->SetFocalPoint(0, 0, 0);
-    mCamera->ComputeViewPlaneNormal();
-    mCamera->Dolly(1.5);
-    // Renderer
-    mRenderer = vtkRenderer::New();
-    mRenderer->AddActor(mActor);
-    mRenderer->SetActiveCamera(mCamera);
-    mRenderer->ResetCamera();
-    mRenderer->SetBackground(1,1,1);
-    mRenderer->ResetCameraClippingRange();
-    // Window
-    mRenderWindow = vtkRenderWindow::New();
-    mRenderWindow->SetSize(640, 480);
-    mRenderWindow->AddRenderer(mRenderer);
-    
-    mRenderWindowInteractor = new wxVTKRenderWindowInteractor(panel,-1);
-    mRenderWindowInteractor->UseCaptureMouseOn();      
-    wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
-    sizer      -> Add( mRenderWindowInteractor , 1, wxEXPAND, 0);
-    panel      -> SetSizer(sizer);
-    panel      -> SetAutoLayout(true);
-    panel      -> Layout();
-    mRenderWindowInteractor->SetRenderWindow(mRenderWindow);
-
-    mBox->bbSetOutputInteractor(mRenderWindowInteractor);
-  }
-  //-------------------------------------------------------------------------
-  
-  MIPViewerWidget::~MIPViewerWidget()
-  {
-  }
-  
-  //-------------------------------------------------------------------------
-  void MIPViewerWidget::Update()
-  {
-
-    
-    if ( mImageData != mBox->bbGetInputIn() )
-      {
-       mImageData = mBox->bbGetInputIn();
-       
-       mCast->SetShift(0);
-       mCast->SetScale(1.0);
-       mCast->SetInput(mImageData);
-       
-       int x1,x2,y1,y2,z1,z2;
-       double spx,spy,spz;
-       mImageData->GetSpacing(spx,spy,spz);
-       mImageData->GetExtent (x1,x2,y1,y2,z1,z2);
-       
-       mCamera->SetViewUp ( spx*0, -spy*1, spz*0);
-       mCamera->SetPosition( spx*(x1+x2)/2, spy*(y1+y2)/2, -spz*z2*2 ); 
-       mCamera->SetFocalPoint  ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*(z1+z2)/2); 
-       mCamera->SetClippingRange( 0.01, 1000000 );
-       mCamera->ComputeViewPlaneNormal();
-       mCamera->Zoom( 1 );
-      }
-    mCast->SetScale( mBox->bbGetInputScale() / 100. );
-    mCast->SetShift( - mBox->bbGetInputShift() );
-    
-    mRenderWindowInteractor->Refresh();
-    
-    Refresh();
-  }
-
-
-
-
-  //--------------------------------------------------------------------------
-  //-------------------------------------------------------------------------
-  //--------------------------------------------------------------------------
-  //--------------------------------------------------------------------------
-
-
-  BBTK_USER_BLACK_BOX_IMPLEMENTATION(MIPViewer,bbtk::WxBlackBox);
-
-
-  void MIPViewer::Process() 
-  { 
-    ((MIPViewerWidget*)bbGetOutputWidget())->Update();
-  }
-  
-
-  /**
-   * \brief  Create wxWidget . 
-   *
-   *
-   */ 
-  void MIPViewer::CreateWidget()
-  {
-    bbtkDebugMessageInc("Core",9,"MIPViewer::CreateWidget()"<<std::endl);
-
-    MIPViewerWidget* w = new MIPViewerWidget(this,bbGetWxParent());
-    w->Update();
-    bbSetOutputWidget(w);
-
-    bbtkDebugDecTab("Core",9);
-  }
-
-
-}//namespace bbtk
-
-#endif
-
diff --git a/packages/wxvtk/src/bbwxvtkMIPViewer.h b/packages/wxvtk/src/bbwxvtkMIPViewer.h
deleted file mode 100644 (file)
index 3295ed2..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*=========================================================================
-                                                                                
-  Program:   bbtk
-  Module:    $RCSfile: bbwxvtkMIPViewer.h,v $
-  Language:  C++
-  Date:      $Date: 2008/03/03 13:14:27 $
-  Version:   $Revision: 1.1 $
-                                                                                
-  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
-  l'Image). All rights reserved. See Doc/License.txt or
-  http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
-                                                                                
-     This software is distributed WITHOUT ANY WARRANTY; without even
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE.  See the above copyright notices for more information.
-                                                                                
-=========================================================================*//**
- * \brief Short description in one line
- * 
- * Long description which 
- * can span multiple lines
- */
-/**
- * \file 
- * \brief Pattern for the definition of a new type of Node (header)
- */
-/**
- * \class bbtk::NodePatern 
- * \brief Pattern for the definition of a new type of Node 
- */
-
-
-#ifdef _USE_WXWIDGETS_
-#ifdef _USE_VTK_
-
-
-#ifndef __bbwxvtkMIPViewer_h_INCLUDED__
-#define __bbwxvtkMIPViewer_h_INCLUDED__
-
-#include "vtkImageData.h"
-#include "vtkImageViewer2.h"
-
-#include "bbtkWxBlackBox.h"
-#include "wxVTKRenderWindowInteractor.h"
-
-#include <vtkImageShiftScale.h>
-#include <vtkVolumeRayCastMIPFunction.h>
-#include <vtkVolumeRayCastMapper.h>
-#include <vtkVolume.h>
-#include <vtkActor.h>
-#include <vtkCamera.h>
-
-namespace bbwxvtk
-{
-
-  class MIPViewer; 
-
-  //--------------------------------------------------------------------------
-  class MIPViewerWidget : public wxPanel
-  {
-  public:
-    MIPViewerWidget(MIPViewer* box, wxWindow *parent);
-    ~MIPViewerWidget();
-    void Update();   
-    vtkRenderWindowInteractor* GetInteractor() { return mRenderWindowInteractor; }
-  private:
-    MIPViewer              *mBox;
-    vtkImageData          *mImageData;
-    
-    wxVTKRenderWindowInteractor  *mRenderWindowInteractor;
-
-    /*
-    vtkContourFilter* mContourFilter;
-    vtkSmoothPolyDataFilter* mSmoothPolyDataFilter;
-    vtkPolyDataNormals* mPolyDataNormals;
-    vtkPolyDataMapper* mPolyDataMapper;
-    */
-    vtkImageShiftScale* mCast;
-    vtkVolumeRayCastMIPFunction* mMIP;
-    vtkVolumeRayCastMapper* mMapper;
-
-    vtkVolume* mActor;
-    vtkCamera* mCamera;
-    vtkRenderer* mRenderer;
-    vtkRenderWindow* mRenderWindow;
- };
-  
-  //------------------------------------------------------------------------
-  //------------------------------------------------------------------------
-  //------------------------------------------------------------------------
-  
-  class /*BBTK_EXPORT*/ MIPViewer : public bbtk::WxBlackBox
-  {    
-    BBTK_USER_BLACK_BOX_INTERFACE(MIPViewer,bbtk::WxBlackBox);
-    //    BBTK_DECLARE_INPUT(Contour,int);
-    BBTK_DECLARE_INPUT(In,vtkImageData *);
-    BBTK_DECLARE_INPUT(Shift,int);
-    BBTK_DECLARE_INPUT(Scale,float);
-    BBTK_DECLARE_OUTPUT(Interactor,vtkRenderWindowInteractor*);
-    BBTK_PROCESS(Process);
-    void Process();
-    BBTK_CREATE_WIDGET(CreateWidget);
-    void CreateWidget();
-  };
-   
-  //=================================================================
-  // UserBlackBox description
-  BBTK_BEGIN_DESCRIBE_BLACK_BOX(MIPViewer,bbtk::WxBlackBox);
-  BBTK_NAME("MIPViewer");
-  BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
-  BBTK_DESCRIPTION("Maximum Intensity Projection (MIP) view of a 3D image");
-  BBTK_CATEGORY("viewer");
-  BBTK_INPUT(MIPViewer,Shift,"Gray scale shift",int);
-  BBTK_INPUT(MIPViewer,Scale,"Gray scale scaling",float);
-  BBTK_INPUT(MIPViewer,In,"Input Image",vtkImageData *);
-  BBTK_OUTPUT(MIPViewer,Interactor,"Interactor",vtkRenderWindowInteractor *);
-  BBTK_END_DESCRIBE_BLACK_BOX(MIPViewer);
-  //=================================================================
-
-
-}//namespace bbwxvtk
-
-#endif  //__bbtwxvtkMIPViewer_h__
-
-#endif //_USE_VTK_
-#endif //_USE_WXWIDGETS_
index 43b924d25ef27067fb9f14cf892733a84d1f5b8e..ea51a54339997dc26f4908cb2d94b66c5bcba346 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxvtkViewer3D.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/03 13:14:27 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/03/19 13:30:19 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -94,6 +94,7 @@ namespace bbwxvtk
   BBTK_NAME("Viewer3D");
   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("3D Viewer (vtk)");
+  BBTK_CATEGORY("viewer");
   BBTK_INPUT(Viewer3D,In1,"Input actor",vtkProp3D *);
   BBTK_INPUT(Viewer3D,In2,"Input actor",vtkProp3D *);
   BBTK_INPUT(Viewer3D,In3,"Input actor",vtkProp3D *);