//===========================================================================
#define BBTK_VTK_SET_DEFAULT_VALUES() \
- mVtkObject = NULL;
+ mVtkObject = bbVtkObject::New();
+// mVtkObject = NULL;
//===========================================================================
#define BBTK_VTK_INITIALIZE_PROCESSING() \
- mVtkObject = bbVtkObject::New();
+ mVtkObject = mVtkObject;
+// mVtkObject = bbVtkObject::New();
//===========================================================================
#define BBTK_VTK_FINALIZE_PROCESSING() \
bbSetInputOpacity(1);
bbSetInputRepresentation(2);
bbSetInputLineWidth(1);
+ bbSetInputScalarVisibility(false);
polydatamapper = NULL;
vtkactor = NULL;
// polydatamapper->SetInput(marchingcubes->GetOutput());
vtkactor->SetMapper(polydatamapper);
- polydatamapper->ScalarVisibilityOff();
-// polydatamapper->ScalarVisibilityOn();
polydatamapper->ImmediateModeRenderingOn();
}
{
firsttime=false;
bbGetInputRenderer()->AddActor( vtkactor );
- }
+ } // firsttime
+
+ if (bbGetInputScalarVisibility()==true )
+ {
+ polydatamapper->ScalarVisibilityOn();
+ } else {
+ polydatamapper->ScalarVisibilityOff();
+ } // ScalarVisibility
+
+
}
+
+
+
} // EO namespace bbtk
#endif //_USE_VTK_
BBTK_DECLARE_INPUT(Colour,std::vector<double>);
BBTK_DECLARE_INPUT(Renderer,vtkRenderer *);
BBTK_DECLARE_INPUT(Transform, vtkLinearTransform *);
- BBTK_DECLARE_INPUT(Representation, int);
- BBTK_DECLARE_INPUT(LineWidth, double);
+ BBTK_DECLARE_INPUT(Representation, int);
+ BBTK_DECLARE_INPUT(LineWidth, double);
+ BBTK_DECLARE_INPUT(ScalarVisibility, bool);
BBTK_DECLARE_OUTPUT(Out,vtkProp3D *);
BBTK_PROCESS(DoProcess);
BBTK_INPUT(PolyDataToActor,Transform,"Linear Transform (4x4 homogeneous)",vtkLinearTransform*,"");
BBTK_INPUT(PolyDataToActor,Representation,"0 points,1 wireframe, 2(default) surface",int,"");
BBTK_INPUT(PolyDataToActor,LineWidth,"Width of the wireframe (1 default)",double,"");
+ BBTK_INPUT(PolyDataToActor,ScalarVisibility,"Scalar Visibility (false default)",bool,"");
BBTK_OUTPUT(PolyDataToActor,Out,"Extracted iso-surface",vtkProp3D *,"");
BBTK_END_DESCRIBE_BLACK_BOX(PolyDataToActor);
<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" 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" />
<process>
<PRE>
+
+
bbGetVtkObject()->SetCenter(bbGetInputCenterX(),
bbGetInputCenterY(),
bbGetInputCenterZ());
+//bbGetVtkObject()->SetPhiResolution(bbGetInputPhiResolution());
+//bbGetVtkObject()->SetThetaResolution(bbGetInputThetaResolution());
+//bbGetVtkObject()->SetRadius(bbGetInputRadius());
+//printf("EED box vtk:SphereSource theta=%d phi=%d\n", bbGetInputThetaResolution() , bbGetInputPhiResolution());
+
bbGetVtkObject()->Update();
</PRE>
</process>
} else {
colorLookupTable = vtkLookupTable::New();
}
+ colorLookupTable->SetTableRange(range[0],range[1]);
+ colorLookupTable->Build();
+ double rgba1[4];
+ double rgba2[4];
+ for (int iLookTable = 0; iLookTable<128; iLookTable++)
+ {
+ colorLookupTable->GetTableValue( iLookTable, rgba1);
+ colorLookupTable->GetTableValue(256-1-iLookTable, rgba2);
+
+ colorLookupTable->SetTableValue(256-1-iLookTable , rgba1[0],rgba1[1],rgba1[2],rgba1[3]);
+ colorLookupTable->SetTableValue( iLookTable , rgba2[0],rgba2[1],rgba2[2],rgba2[3]);
+ } // for iLookTable
+
}
- colorLookupTable->SetTableRange(range[0],range[1]);
- colorLookupTable->Build();
+
+
+
+
+
+
bbGetInputMesh()->GetPointData()->SetScalars(colors);
if (bbGetInputColorType()==1)
BBTK_CATEGORY("");
BBTK_INPUT(SurfaceTexture,Mesh,"Mesh topology",vtkPolyData*,"");
BBTK_INPUT(SurfaceTexture,Image,"Image Reference",vtkImageData*,"");
- BBTK_INPUT(SurfaceTexture,ColorType,"Color Type (default 0) 0 Colors, 1 ColorWindowLevel",int,"");
+ BBTK_INPUT(SurfaceTexture,ColorType,"Color Type (default 0) 0 Colors(JET), 1 ColorWindowLevel",int,"");
BBTK_INPUT(SurfaceTexture,ColorLevel,"Color Level (default 500)",double,"");
BBTK_INPUT(SurfaceTexture,ColorWindow,"ColorWindow (default 500)",double,"");
BBTK_INPUT(SurfaceTexture,Transform,"vtk Linear Transform (default NULL)",vtkLinearTransform*,"");