public bbtk::WxBlackBox
{
BBTK_BLACK_BOX_INTERFACE(VolumeRendering,bbtk::WxBlackBox);
-
-
BBTK_DECLARE_INPUT(In0,vtkImageData*);
BBTK_DECLARE_INPUT(In1,vtkImageData*);
private:
vtkRenderer* _currentrenderer;
-
+
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(VolumeRendering,bbtk::WxBlackBox);
BBTK_NAME("VolumeRendering");
BBTK_AUTHOR("car-prie@uniandes.edu.co");
BBTK_DESCRIPTION("Volume Rendering of a given image");
-BBTK_CATEGORY("__CATEGORY__");
+BBTK_CATEGORY("actor");
BBTK_INPUT(VolumeRendering,In0,"Image to create the volume rendering",vtkImageData*,"");
BBTK_INPUT(VolumeRendering,In1,"Image to create the volume rendering",vtkImageData*,"");
BBTK_INPUT(VolumeRendering,In2,"Image to create the volume rendering",vtkImageData*,"");
BBTK_INPUT(VolumeRendering,In3,"Image to create the volume rendering",vtkImageData*,"");
-BBTK_INPUT(VolumeRendering,Renderer,"Image to create the volume rendering",vtkRenderer*,"");
+BBTK_INPUT(VolumeRendering,Renderer,"Renderer",vtkRenderer*,"");
BBTK_OUTPUT(VolumeRendering,Out0,"Output resulting image",vtkImageData*,"");
BBTK_OUTPUT(VolumeRendering,Out1,"Output resulting image",vtkImageData*,"");
BBTK_OUTPUT(VolumeRendering,Out2,"Output resulting image",vtkImageData*,"");
BBTK_NAME ( "AxeVolume " ) ;
BBTK_AUTHOR("eduardo.davila@hotmail.com");
BBTK_DESCRIPTION("Axe Volume" ) ;
- BBTK_CATEGORY("__CATEGORY__ fltre view qsdflk qsdf qsdf qsf ");
+ BBTK_CATEGORY("actor");
BBTK_INPUT(AxeVolume,In,"Size image X",vtkImageData*,"");
BBTK_INPUT(AxeVolume,lstPointX,"List of X values", std::vector<double> ,"");
BBTK_INPUT(AxeVolume,lstPointY,"List of Y values", std::vector<double> ,"");
#include "bbmaracasvisuDrawAxe3D.h"
#include "bbcreaMaracasVisuPackage.h"
-
#include "vtkImageData.h"
#include "vtkActor.h"
#include "vtkPoints.h"
#include "vtkCellArray.h"
#include "vtkProperty.h"
-
#include "vtkLinearTransform.h"
namespace bbcreaMaracasVisu
{
-
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,DrawAxe3D)
BBTK_BLACK_BOX_IMPLEMENTATION(DrawAxe3D,bbtk::AtomicBlackBox);
void DrawAxe3D::Process()
{
-
std::vector< double > vectx = bbGetInputlstPointX();
std::vector< double > vecty = bbGetInputlstPointY();
std::vector< double > vectz = bbGetInputlstPointZ();
for( i = 0; i < vectx.size( ); i++) {
//multiplicar ver parametros spacing, en maracas cuando se toca la imagen y se ve dycom
- //hay par·metro dycom, vtkImagedata valor spacing y esos datos hay que multiplicar al polydata
+ //hay parametro dicom, vtkImagedata valor spacing y esos datos hay que multiplicar al polydata
allPoints->InsertNextPoint( vectx[i]*spc[0], vecty[i]*spc[1], vectz[i]*spc[2] );
allTopology->InsertCellPoint( i );
} // rof
}
mvtkactor->GetProperty()->SetColor( bbGetInputColour()[0],
- bbGetInputColour()[1],
- bbGetInputColour()[2] );
+ bbGetInputColour()[1],
+ bbGetInputColour()[2] );
if ( bbGetInputTransform()!=NULL )
{
firsttime=false;
bbGetInputRenderer()->AddActor( mvtkactor );
}
-
}
void DrawAxe3D::bbUserSetDefaultValues()
{
- firsttime = true;
- mallData = NULL;
- polydatamapper = NULL;
- mvtkactor = NULL;
-
+ firsttime = true;
+ mallData = NULL;
+ polydatamapper = NULL;
+ mvtkactor = NULL;
+
std::vector<double> colour;
colour.push_back(1.0);
colour.push_back(0.0);
}
-
+
//-----------------------------------------------------------------
void DrawAxe3D::bbUserInitializeProcessing()
{
- mallData = vtkPolyData::New( );
- polydatamapper = vtkPolyDataMapper::New();
- mvtkactor = vtkActor::New();
+ mallData = vtkPolyData::New( );
+ polydatamapper = vtkPolyDataMapper::New();
+ mvtkactor = vtkActor::New();
polydatamapper->SetInput(mallData);
mvtkactor->SetMapper(polydatamapper);
bbSetOutputOut(mvtkactor);
}
-
+
//-----------------------------------------------------------------
void DrawAxe3D::bbUserFinalizeProcessing()
{
{
mallData->Delete();
mallData=NULL;
- }
+ }
if (polydatamapper!=NULL)
{
polydatamapper->Delete();
polydatamapper=NULL;
- }
+ }
if (mvtkactor!=NULL)
{
mvtkactor->Delete();
mvtkactor=NULL;
- }
-
+ }
}
-
- //-----------------------------------------------------------------
-
-
-
+ //-----------------------------------------------------------------
}
// EO namespace bbcreaMaracasVisu
void Process();
private:
- bool firsttime;
- vtkPolyData *mallData;
- vtkActor *mvtkactor;
- vtkPolyDataMapper *polydatamapper;
+ bool firsttime;
+ vtkPolyData *mallData;
+ vtkActor *mvtkactor;
+ vtkPolyDataMapper *polydatamapper;
};
BBTK_NAME("DrawAxe3D");
BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
BBTK_DESCRIPTION("Draw a 3D axe in a vtk 3D Viewer");
-BBTK_CATEGORY("__CATEGORY__");
+BBTK_CATEGORY("actor");
BBTK_INPUT(DrawAxe3D,Renderer,"vtk Renderer 3D universe",vtkRenderer*,"");
BBTK_INPUT(DrawAxe3D,lstPointX,"list of point X",std::vector<double>,"");
BBTK_INPUT(DrawAxe3D,lstPointY,"list of point Y",std::vector<double>,"");
#include "vtkCellArray.h"
#include "vtkProperty.h"
-
-
namespace bbcreaMaracasVisu
{
private:
- std::vector<vtkPolyData*> vecVtkPolyData;
+ std::vector<vtkPolyData*> vecVtkPolyData;
std::vector<vtkPolyDataMapper*> vecVtkPolyDataMaper;
- std::vector<vtkActor*> vecVtkActors;
+ std::vector<vtkActor*> vecVtkActors;
void DrawOneAxis(int iGeneral,int numPoints, int iAxis);
};
BBTK_NAME("DrawAxisTree3D");
BBTK_AUTHOR("InfoTeam CREATIS-LRMN");
BBTK_DESCRIPTION("Draw Axis Tree 3D");
-BBTK_CATEGORY("__CATEGORY__");
+BBTK_CATEGORY("actor");
BBTK_INPUT(DrawAxisTree3D,Renderer,"Renderer",vtkRenderer*,"");
BBTK_INPUT(DrawAxisTree3D,lstIndexs,"Indexs",std::vector<int>,"");
BBTK_INPUT(DrawAxisTree3D,lstPointX,"lstPointX",std::vector<double>,"");