--- /dev/null
+description "Example of the tranfer function editor for volume rendering"
+author "laurent.guigues at creatis.insa-lyon.fr"
+category "example"
+
+include vtk
+#load wxvtk
+load kw
+
+new LoadHola image
+//new PiecewiseFunction color
+new kwTransferFunctionEditor color
+new kwTransferFunctionEditor opacity
+new VolumeRenderer renderer
+new kwViewer3D viewer
+
+connect image.Out color.In
+connect image.Out opacity.In
+connect image.Out renderer.In
+connect color.Out renderer.ColorFunction
+connect opacity.Out renderer.OpacityFunction
+connect renderer.Out viewer.In1
+connect color.BoxChange viewer.BoxExecute
+
+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"
+
+//new kwLayoutSplit main
+//connect viewer.Widget main.Widget1
+//connect color.Widget main.Widget2
+
+set color.Title "Transfer function"
+set opacity.Title "Opacity"
+
+exec color
+exec opacity
+exec viewer
+//exec main
Program: bbtk
Module: $RCSfile: bbkwTransferFunctionEditor.cxx,v $
Language: C++
- Date: $Date: 2008/12/16 12:48:07 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/12/16 13:00:27 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
{
bbSetInputIn(0);
bbSetOutputOut(0);
+ bbSetInputTitle("Transfer function");
bbSetOutputWidget(0);
}
// w->ExpandCanvasWidthOff();
// w->ExpandCanvasHeightOn();
// w->SetCanvasWidth(450);
- w->SetCanvasHeight( parent->GetHeight() );
- w->SetLabelText("");//Transfer Function Editor");
+ w->SetCanvasHeight( parent->GetHeight() - 100 );
+ w->SetLabelText(bbGetInputTitle().c_str());
w->SetBalloonHelpString("Edit the transfer function");
w->LockEndPointsParameterOn();
Program: bbtk
Module: $RCSfile: bbkwTransferFunctionEditor.h,v $
Language: C++
- Date: $Date: 2008/12/16 12:48:08 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/12/16 13:00:27 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_DECLARE_INPUT(In,vtkImageData*);
BBTK_DECLARE_OUTPUT(Out,vtkPiecewiseFunction*);
+ BBTK_DECLARE_INPUT(Title,std::string);
+
BBTK_PROCESS(Process);
BBTK_CREATE_KWWIDGET(CreateWidget);
BBTK_INPUT(TransferFunctionEditor,In,
"Image from which to extract the histogram to display",
vtkImageData*,"");
+ BBTK_INPUT(TransferFunctionEditor,Title,
+ "Title",std::string,"");
BBTK_OUTPUT(TransferFunctionEditor,Out,"Piecewise function",
vtkPiecewiseFunction*,"");
BBTK_END_DESCRIBE_BLACK_BOX(TransferFunctionEditor);