Program: bbtk
Module: $RCSfile: bbtkVtkBlackBoxMacros.h,v $
Language: C++
- Date: $Date: 2009/05/28 08:12:06 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2009/12/18 18:37:44 $
+ Version: $Revision: 1.14 $
=========================================================================*/
/* ---------------------------------------------------------------------
{ \
bbtkBlackBoxDebugMessage("process",1,"**> Processing..." \
<<std::endl); \
- mVtkObject->Update(); \
+ mVtkObject->Update(); \
+printf("EED Process %s\n", bbGetFullName().c_str() ); \
+ vtkIndent indent(2); \
+ mVtkObject->PrintSelf(std::cout, indent ); \
bbtkBlackBoxDebugMessage("process",2,"<** Processing" \
<<std::endl); \
}
new LoadHola reader
new MarchingCubes mc
- set mc.Value 800
+ set mc.Value 1000
connect reader.Out mc.In
connect viewer.Widget main.Widget1
connect button.Widget main.Widget2
-exec viewer
+exec main
+
+
# --- ---
new MarchingCubes mc
- new PolyDataToActor eedTrans
+ new PolyDataToActor polydatatoactor
+ connect mc.Out polydatatoactor.In
- connect mc.Out eedTrans.In
+ new MagicBox mb
+ connect mb.BoxChange mc.BoxExecute
+ connect mb.BoxChange polydatatoactor.BoxExecute
# --- ---
input In mc.In "vtkImageData"
- input Isovalue eedTrans.Isovalue "Isovalue"
- input Opacity eedTrans.Opacity "Opacity"
- input Colour eedTrans.Colour "R G B"
- input Renderer eedTrans.Renderer "3D scene in which to insert the surface"
- input Transform eedTrans.Transform "Linear Transform (4x4 homogeneous)"
-
- output Out eedTrans.Out "Extracted iso-surface (as a vtkProp3D *)"
+ input Isovalue mc.Value "Isovalue"
+ input Opacity polydatatoactor.Opacity "Opacity"
+ input Colour polydatatoactor.Colour "R G B"
+ input Renderer polydatatoactor.Renderer "3D scene in which to insert the surface"
+ input Transform polydatatoactor.Transform "Linear Transform (4x4 homogeneous)"
+ input BoxExecute mb.BoxExecute "BoxExecute"
+
+
+ output Out polydatatoactor.Out "Extracted iso-surface (as a vtkProp3D *)"
endefine
Program: bbtk
Module: $RCSfile: bbvtkMarchingCubes.cxx,v $
Language: C++
- Date: $Date: 2009/12/18 16:47:44 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2009/12/18 18:41:42 $
+ Version: $Revision: 1.7 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_BLACK_BOX_IMPLEMENTATION(MarchingCubes,bbtk::AtomicBlackBox);
+ void MarchingCubes::Process()
+ {
+ bbGetVtkObject()->SetValue(0, bbGetInputValue() );
+ bbGetVtkObject()->Update();
+ }
+
//-----------------------------------------------------------------
void MarchingCubes::bbUserSetDefaultValues()
{
BBTK_VTK_SET_DEFAULT_VALUES();
+ bbSetInputValue(400);
}
//-----------------------------------------------------------------
Program: bbtk
Module: $RCSfile: bbvtkMarchingCubes.h,v $
Language: C++
- Date: $Date: 2009/12/18 16:47:45 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2009/12/18 18:37:56 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
//=======================================================================
class /*BBTK_EXPORT*/ MarchingCubes
:
- public bbtk::AtomicBlackBox,
- public vtkMarchingCubes
+ public bbtk::AtomicBlackBox
+// ,public vtkMarchingCubes
{
BBTK_VTK_BLACK_BOX_INTERFACE(MarchingCubes,
bbtk::AtomicBlackBox,
vtkMarchingCubes);
BBTK_DECLARE_VTK_INPUT(In,vtkImageData *);
+ BBTK_DECLARE_INPUT(Value,double);
BBTK_DECLARE_VTK_OUTPUT(Out,vtkPolyData *);
// For the 'Value' parameter, the standard bbtk macro does not work
// as vtk Get/Set accessors have a parameter...
// BBTK_DECLARE_VTK_PARAM(vtkMarchingCubes,Value,double);
// Hence have to wrap the accessors "by hand" :
+
+ /*
double bbGetInputValue ()
{ return vtkMarchingCubes::GetValue(0); }
void bbSetInputValue (double d)
- { vtkMarchingCubes::SetValue(0,d); }
-
- BBTK_VTK_PROCESS();
-
+ { // vtkMarchingCubes::SetValue(0,d);
+
+ mVtkObject->SetValue(0,1000.0);
+
+ std::cout << "EED MarchingCubes::bbSetInputValue " << d << std::endl;
+
+ }
+*/
+
+
+ // BBTK_VTK_PROCESS();
+ BBTK_PROCESS(Process);
+ void Process();
};
//=======================================================================
bbSetInputIn(NULL);
bbSetInputRenderer(NULL);
bbSetInputTransform(NULL);
- bbSetInputIsovalue(400);
bbSetInputOpacity(1);
polydatamapper = NULL;
//---------------------------------------------------------------------
void PolyDataToActor::DoProcess()
- {
- polydatamapper->SetInput( bbGetInputIn() );
+ {
+ polydatamapper->SetInput( bbGetInputIn() );
vtkactor->GetProperty()->SetColor( bbGetInputColour()[0],
bbGetInputColour()[1],
BBTK_BLACK_BOX_INTERFACE(PolyDataToActor,bbtk::AtomicBlackBox);
BBTK_DECLARE_INPUT(In,vtkPolyData *);
- BBTK_DECLARE_INPUT(Isovalue,double);
BBTK_DECLARE_INPUT(Opacity,double);
BBTK_DECLARE_INPUT(Colour,std::vector<double>);
BBTK_DECLARE_INPUT(Renderer,vtkRenderer *);
BBTK_CATEGORY("3D object creator");
BBTK_INPUT(PolyDataToActor,In,"Input image",vtkPolyData*,"");
- BBTK_INPUT(PolyDataToActor,Isovalue,"Isovalue",double,"");
BBTK_INPUT(PolyDataToActor,Opacity,"Opacity",double,"");
BBTK_INPUT(PolyDataToActor,Colour,"r g b",vectorcolour,"colour");
BBTK_INPUT(PolyDataToActor,Renderer,"3D scene in which to insert the surface",vtkRenderer*,"");