COMPLEXOUTPUTS:1
COMPLEX_PORT
BoxChangeImageSlice
--103.179738:-315.738386:-900.000000
+-180.302777:-317.574649:-900.000000
FIN_COMPLEX_PORT
-COMPLEXINPUTS:7
+COMPLEXINPUTS:9
COMPLEX_PORT
Direction
-431.136158:282.815347:-900.000000
Render
-100.149261:284.086627:-900.000000
FIN_COMPLEX_PORT
+COMPLEX_PORT
+BorderActive
+-660.228760:278.316839:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Interpolation_mode
+43.962217:266.623739:-900.000000
+FIN_COMPLEX_PORT
BOXES:43
BOX
creaMaracasVisu:SliceImage:Box00
ISEXEC:FALSE
--193.219395:-71.815131:-900.000000
--155.994395:-81.815131:-900.000000
+-195.575128:-74.642011:-900.000000
+-158.350128:-84.642011:-900.000000
PORT
TypeOrientation:"1"
FIN_BOX
vtk:Transform:Box17
ISEXEC:FALSE
-320.706867:-77.874112:-900.000000
--221.593691:-87.874112:-900.000000
+-216.883834:-87.874112:-900.000000
FIN_BOX
BOX
std:ConcatStrings:Box18
ISEXEC:FALSE
-272.546519:-70.682423:-900.000000
--195.023732:-80.682423:-900.000000
+-232.821519:-80.682423:-900.000000
PORT
In1:"0 "
PORT
BOX
creaVtk:ScalarsToColors:Box22
ISEXEC:FALSE
--439.528193:-206.813913:-900.000000
--398.003193:-216.813913:-900.000000
+-266.449667:-213.711970:-900.000000
+-211.174992:-223.711970:-900.000000
PORT
Type:"1"
FIN_BOX
vtk:Transform:Box32
ISEXEC:FALSE
-321.807500:-96.018762:-900.000000
--286.232500:-106.018762:-900.000000
+-217.103627:-106.018762:-900.000000
FIN_BOX
BOX
creaMaracasVisu:DrawAxisTree3D:Box26
ISEXEC:FALSE
--273.473729:-218.831241:-900.000000
--228.233729:-228.831241:-900.000000
+-516.159924:-217.577049:-900.000000
+-235.323332:-227.577049:-900.000000
PORT
Colour:"0 0 0"
PORT
vtk:Transform:Box27
ISEXEC:FALSE
-316.662998:-136.217224:-900.000000
--220.662861:-146.217224:-900.000000
+-216.004660:-146.217224:-900.000000
FIN_BOX
BOX
std:CreateArithmeticSuiteVector:Box33
ISEXEC:FALSE
-531.652610:-47.521093:-900.000000
--477.677610:-57.521093:-900.000000
+-269.420233:-57.521093:-900.000000
PORT
Delta:"0"
PORT
std:GetVectorDoubleElement:Box34
ISEXEC:FALSE
-528.461121:-23.430170:-900.000000
--477.411121:-33.430170:-900.000000
+-268.760853:-33.430170:-900.000000
PORT
I:"0"
FIN_BOX
std:MathOperationVector:Box35
ISEXEC:FALSE
-532.115714:-65.685386:-900.000000
--484.590714:-75.685386:-900.000000
+-245.000026:-75.685386:-900.000000
PORT
In1:"0 1 1 0 0 "
PORT
std:CreateArithmeticSuiteVector:Box36
ISEXEC:FALSE
-461.446157:-46.434918:-900.000000
--260.565447:-56.434918:-900.000000
+-254.034698:-56.434918:-900.000000
PORT
Delta:"0"
PORT
std:MathOperationVector:Box37
ISEXEC:FALSE
-462.838158:-67.517853:-900.000000
--236.158155:-77.517853:-900.000000
+-229.614491:-77.517853:-900.000000
PORT
In1:"0 0 1 1 0 "
PORT
std:ConcatStrings:Box40
ISEXEC:FALSE
-451.527135:125.243442:-900.000000
--411.802135:115.243442:-900.000000
+-230.276764:115.243442:-900.000000
PORT
In1:"0"
FIN_BOX
std:StringSelect:Box41
ISEXEC:FALSE
-369.319073:-76.024573:-900.000000
--214.516358:-86.024573:-900.000000
+-209.173708:-86.024573:-900.000000
PORT
In0:"0 1 0 0"
PORT
In2:"-90 0 1 0"
FIN_BOX
BOX
-std:StringSelect:Box42
-ISEXEC:FALSE
--362.110000:-136.869133:-900.000000
--212.887406:-146.869133:-900.000000
-PORT
-In0:"0 1 0 0"
-PORT
-In1:"-90 0 0 1"
-PORT
-In2:"-90 0 0 1"
-FIN_BOX
-BOX
std:GetVectorDoubleElement:Box44
ISEXEC:FALSE
-459.560548:-23.370210:-900.000000
--260.100032:-33.370210:-900.000000
+-253.595111:-33.370210:-900.000000
PORT
I:"1"
FIN_BOX
vtk:Transform:Box52
ISEXEC:FALSE
-312.196510:-56.034435:-900.000000
--219.732031:-66.034435:-900.000000
-FIN_BOX
-BOX
-std:StringSelect:Box53
-ISEXEC:FALSE
--357.946944:-52.565356:-900.000000
--211.723868:-62.565356:-900.000000
-PORT
-In0:"0 1 0 0"
-PORT
-In1:"0 1 0 0"
-PORT
-In2:"-90 0 1 0"
+-215.125487:-66.034435:-900.000000
FIN_BOX
BOX
std:StringSelect:Box55
std:ConcatStrings:Box57
ISEXEC:FALSE
-364.668989:127.201835:-900.000000
--324.943989:117.201835:-900.000000
+-211.154742:117.201835:-900.000000
PORT
In2:" "
FIN_BOX
std:ConcatStrings:Box62
ISEXEC:FALSE
-297.110093:125.771424:-900.000000
--200.841419:115.771424:-900.000000
+-196.428586:115.771424:-900.000000
PORT
In1:"1 1 0"
FIN_BOX
std:GetVectorDoubleElement:Box64
ISEXEC:FALSE
-387.763181:205.752953:-900.000000
--243.345093:195.752953:-900.000000
+-336.713181:195.752953:-900.000000
PORT
I:"0"
FIN_BOX
std:ConcatStrings:Box65
ISEXEC:FALSE
-366.909956:245.293365:-900.000000
--216.898236:235.293365:-900.000000
+-327.184956:235.293365:-900.000000
FIN_BOX
BOX
std:Div:Box66
std:Add:Box67
ISEXEC:FALSE
-389.417275:153.273064:-900.000000
--246.890508:143.273064:-900.000000
+-241.289576:143.273064:-900.000000
FIN_BOX
BOX
std:GetVectorDoubleElement:Box68
std:Mul:Box69
ISEXEC:FALSE
-406.100940:175.438942:-900.000000
--250.846535:165.438942:-900.000000
+-376.300940:165.438942:-900.000000
PORT
In2:"-1"
FIN_BOX
std:Add:Box70
ISEXEC:FALSE
-345.592205:152.557386:-900.000000
--236.651379:142.557386:-900.000000
+-231.618668:142.557386:-900.000000
FIN_BOX
BOX
std:MathOperation:Box72
ISEXEC:FALSE
-257.408453:-30.946538:-900.000000
--213.093120:-40.946538:-900.000000
+-209.196852:-40.946538:-900.000000
PORT
In1:"1"
PORT
std:MathOperation:Box73
ISEXEC:FALSE
-263.661305:-53.857110:-900.000000
--214.489365:-63.857110:-900.000000
+-210.515612:-63.857110:-900.000000
PORT
Type:"2"
FIN_BOX
std:StringSelect:Box74
ISEXEC:FALSE
-336.062237:53.397805:-900.000000
--293.902237:43.397805:-900.000000
+-201.920527:43.397805:-900.000000
PORT
In0:"2"
PORT
std:GetVectorDoubleElement:Box75
ISEXEC:FALSE
-261.893099:1.211259:-900.000000
--210.843099:-8.788741:-900.000000
+-210.076025:-8.788741:-900.000000
FIN_BOX
BOX
vtk:Transform:Box79
ISEXEC:FALSE
-313.408336:-36.360191:-900.000000
--219.964739:-46.360191:-900.000000
+-215.345280:-46.360191:-900.000000
PORT
Scale:"1 1 1"
FIN_BOX
std:StringSelect:Box81
ISEXEC:FALSE
-474.548561:74.412243:-900.000000
--432.388561:64.412243:-900.000000
+-232.252011:64.412243:-900.000000
PORT
In0:"0"
PORT
std:MathOperationVector:Box82
ISEXEC:FALSE
-450.471349:8.131320:-900.000000
--233.365665:-1.868680:-900.000000
+-402.946349:-1.868680:-900.000000
PORT
In1:"-1 -1 -1"
PORT
Type:"0"
FIN_BOX
-CONNECTIONS:65
+BOX
+std:MagicBox:Box83
+ISEXEC:FALSE
+-672.007424:211.414023:-900.000000
+-635.932424:201.414023:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box78
+ISEXEC:FALSE
+28.546863:157.851551:-900.000000
+64.621863:147.851551:-900.000000
+FIN_BOX
+CONNECTIONS:67
CONNECTION
Box22:LookupTable:Box04:LookupTable
NumberOfControlPoints:0
Box40:Out:Box41:In
NumberOfControlPoints:0
CONNECTION
-Box40:Out:Box42:In
-NumberOfControlPoints:0
-CONNECTION
Box44:Out:Box36:FirstValue
NumberOfControlPoints:0
CONNECTION
Box52:Out:Box17:In
NumberOfControlPoints:0
CONNECTION
-Box40:Out:Box53:In
-NumberOfControlPoints:0
-CONNECTION
Box40:Out:Box55:In
NumberOfControlPoints:0
CONNECTION
Box82:Out:Box34:In
NumberOfControlPoints:0
CONNECTION
-Box20:Size:Box44:In
+Box82:Out:Box44:In
+NumberOfControlPoints:0
+CONNECTION
+BorderActive:BorderActive:Box83:In
+NumberOfControlPoints:0
+CONNECTION
+Box83:Out:Box26:Active
+NumberOfControlPoints:0
+CONNECTION
+Interpolation_mode:Interpolation_mode:Box78:In
+NumberOfControlPoints:0
+CONNECTION
+Box78:Out:Box00:InterpolationMode
NumberOfControlPoints:0
APP_END
set Box41.In1 "90 1 0 0"
set Box41.In2 "-90 0 1 0"
-new std:StringSelect Box42
- set Box42.In0 "0 1 0 0"
- set Box42.In1 "-90 0 0 1"
- set Box42.In2 "-90 0 0 1"
-
new std:GetVectorDoubleElement Box44
set Box44.I "1"
new vtk:Transform Box52
-new std:StringSelect Box53
- set Box53.In0 "0 1 0 0"
- set Box53.In1 "0 1 0 0"
- set Box53.In2 "-90 0 1 0"
-
new std:StringSelect Box55
set Box55.In0 "1"
set Box55.In1 "-1"
set Box82.In1 "-1 -1 -1"
set Box82.Type "0"
+new std:MagicBox Box83
+
+new std:MagicBox Box78
+
connect Box22.LookupTable Box04.LookupTable
connect Box32.Out Box04.Transform
connect Box38.Out Box00.In
connect Box38.Out Box20.In
connect Box40.Out Box41.In
-connect Box40.Out Box42.In
connect Box44.Out Box36.FirstValue
connect Box40.Out Box45.In
connect Box40.Out Box46.In
connect Box46.Out Box44.I
connect Box17.Out Box32.In
connect Box52.Out Box17.In
-connect Box40.Out Box53.In
connect Box40.Out Box55.In
connect Box57.Out Box22.Range
connect Box60.Out Box00.Slice
connect Box81.Out Box00.TypeOrientation
connect Box20.Size Box82.In0
connect Box82.Out Box34.In
-connect Box20.Size Box44.In
+connect Box82.Out Box44.In
+connect Box83.Out Box26.Active
+connect Box78.Out Box00.InterpolationMode
# Complex input ports
input Direction Box40.In1 " "
input SliceOpacity Box04.Opacity " "
input Render Box61.In " "
input WindowColorLevel Box65.In1 " "
+input BorderActive Box83.In " "
+input Interpolation_mode Box78.In " "
# Complex output ports
output BoxChangeImageSlice Box04.BoxChange " "
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,SliceImage)
BBTK_BLACK_BOX_IMPLEMENTATION(SliceImage,bbtk::AtomicBlackBox);
+
void SliceImage::Process()
{
vtkImageData *imagedata=NULL;
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
- imageReslice->SetInput( bbGetInputIn() );
+ imageReslice->SetInput( bbGetInputIn() );
#else
- imageReslice->SetInputData( bbGetInputIn() );
+ imageReslice->SetInputData( bbGetInputIn() );
#endif
- imageReslice->SetInformationInput(bbGetInputIn() );
+ imageReslice->SetInformationInput(bbGetInputIn() );
- double slice=bbGetInputSlice();
- if (slice<0)
- {
- slice=0;
- }
-
- if (bbGetInputTypeOrientation()==3)
- {
+ double slice=bbGetInputSlice();
+ if (slice<0)
+ {
+ slice=0;
+ }
+
+ if (bbGetInputTypeOrientation()==3)
+ {
// Orientation 3 = FREE
// v1 = [ v1x , v1y , v1z ]
// v2 = [ v2x , v2y , v2z ]
// SetResliceAxesDirectionCosines(v1x,v2x,v3x,v1y,v2y,v3y,v1z,v2z,v3z);
imageReslice->SetResliceAxesDirectionCosines( 1,0,0, 0,0,1, 0,-1,0 );
imageReslice->SetResliceAxesOrigin(0, slice*bbGetInputIn()->GetSpacing()[1],0 );
- } else
- {
+ } else {
// Orientation 0 = XY
// v1 = [ 1 , 0 , 0 ]
// v2 = [ 0 , 1 , 0 ]
imageReslice->SetResliceAxesOrigin(0,0, slice*bbGetInputIn()->GetSpacing()[2] );
}
imageReslice->SetOutputDimensionality(2);
- imageReslice->SetInterpolationModeToLinear();
-
-
-
-
-
-
-
-
+ if ( bbGetInputInterpolationMode()==0) { printf("EED neighbor\n"); imageReslice->SetInterpolationModeToNearestNeighbor(); }
+ if ( bbGetInputInterpolationMode()==1) { printf("EED linear\n"); imageReslice->SetInterpolationModeToLinear(); }
+ if ( bbGetInputInterpolationMode()==2) { printf("EED Cubic\n"); imageReslice->SetInterpolationModeToCubic(); }
+
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
imagedata = imageReslice->GetOutput();
bbSetInputIn(NULL);
bbSetInputZ(0);
bbSetInputSlice(0);
+ bbSetInputInterpolationMode(2); // Linear
bbSetInputTypeOrientation(0);
imageReslice=NULL;
std::vector<double> lstCos;
BBTK_DECLARE_INPUT(In,vtkImageData*);
BBTK_DECLARE_INPUT(Z, double );
BBTK_DECLARE_INPUT(Slice, double );
+ BBTK_DECLARE_INPUT(InterpolationMode,int);
BBTK_DECLARE_INPUT(TypeOrientation, int );
BBTK_DECLARE_INPUT(ResliceAxesDirectionCosines, std::vector<double> );
BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
BBTK_BEGIN_DESCRIBE_BLACK_BOX(SliceImage,bbtk::AtomicBlackBox);
-BBTK_NAME("SliceImage");
-BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
-BBTK_DESCRIPTION("filter");
-BBTK_CATEGORY("");
-BBTK_INPUT(SliceImage,In,"Input image",vtkImageData *,"");
-BBTK_INPUT(SliceImage,Slice,"Slice",double,"");
-BBTK_INPUT(SliceImage,Z,"Z (deprecated)",double,"");
-BBTK_INPUT(SliceImage,ResliceAxesDirectionCosines,"ResliceAxesDirectionCosines [v1x,v1y,v1z,v2x,v2y,v2z,v3x,v3y,v3z], ",std::vector<double>,"");
-BBTK_INPUT(SliceImage,TypeOrientation,"Type orientation (default 0) 0=XY, 1=X-Z, -1=XZ, 2=Y-Z, -2=ZY, 3=Free (Set the input ResliceAxesDirectionCosines)",int,"");
-BBTK_OUTPUT(SliceImage,Out,"Output image",vtkImageData *,"");
+ BBTK_NAME("SliceImage");
+ BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
+ BBTK_DESCRIPTION("filter");
+ BBTK_CATEGORY("");
+
+ BBTK_INPUT(SliceImage,In,"Input image",vtkImageData *,"");
+ BBTK_INPUT(SliceImage,Slice,"Slice",double,"");
+ BBTK_INPUT(SliceImage,Z,"Z (deprecated)",double,"");
+ BBTK_INPUT(SliceImage,InterpolationMode,"(default 1) 0=NearestNeighbor 1=Linear 2=Cubic",int,"");
+ BBTK_INPUT(SliceImage,ResliceAxesDirectionCosines,"ResliceAxesDirectionCosines [v1x,v1y,v1z,v2x,v2y,v2z,v3x,v3y,v3z], ",std::vector<double>,"");
+ BBTK_INPUT(SliceImage,TypeOrientation,"Type orientation (default 0) 0=XY, 1=X-Z, -1=XZ, 2=Y-Z, -2=ZY, 3=Free (Set the input ResliceAxesDirectionCosines)",int,"");
+
+ BBTK_OUTPUT(SliceImage,Out,"Output image",vtkImageData *,"");
+
BBTK_END_DESCRIBE_BLACK_BOX(SliceImage);
}
// EO namespace bbcreaMaracasVisu
{
bbSetOutputImage( marimagedata->GetImageData() );
} // MarImageData
+ std::vector<double> LstWindowColorLevel;
+ LstWindowColorLevel.push_back( vtkbasedata->GetColorWindow() );
+ LstWindowColorLevel.push_back( vtkbasedata->GetColorLevel() );
+ bbSetOutputWindowColorLevel( LstWindowColorLevel );
+ bbSetOutputInterpolation( vtkbasedata->GetInterpolate() );
+
} // BaseData
}
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
- bbSetOutputDirection(2);
- bbSetOutputvtkRenderer(NULL);
+
+ std::vector<double> LstWindowColorLevel;
+ LstWindowColorLevel.push_back( 1000 );
+ LstWindowColorLevel.push_back( 500 );
+ bbSetOutputWindowColorLevel( LstWindowColorLevel );
+ bbSetOutputDirection(2);
+ bbSetOutputInterpolation(true);
+ bbSetOutputvtkRenderer(NULL);
}
//=====
BBTK_DECLARE_OUTPUT(vtkRenderer,vtkRenderer*);
BBTK_DECLARE_OUTPUT(Direction,int);
BBTK_DECLARE_OUTPUT(Image,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(WindowColorLevel,std::vector<double>);
+ BBTK_DECLARE_OUTPUT(Interpolation,bool);
+
BBTK_PROCESS(Process);
void Process();
//=====
BBTK_OUTPUT(wxVtkBaseView_Info,Direction,"Direction -1=3D 0=YZ 1=XZ 2=XY(default)",int,"");
BBTK_OUTPUT(wxVtkBaseView_Info,vtkRenderer,"vtkRenderer default=NULL",vtkRenderer*,"");
BBTK_OUTPUT(wxVtkBaseView_Info,Image,"vtkImageData",vtkImageData*,"");
+ BBTK_OUTPUT(wxVtkBaseView_Info,WindowColorLevel,"List [Window, Level]",std::vector<double>,"");
+ BBTK_OUTPUT(wxVtkBaseView_Info,Interpolation,"(default true) true/false",bool,"");
BBTK_END_DESCRIBE_BLACK_BOX(wxVtkBaseView_Info);
//=====
{
printf("DrawAxisTree3D::Process Start >> %s\n", bbGetFullName().c_str() );
- if ( (bbGetInputlstPointX().size()==bbGetInputlstPointY().size()) &&
- (bbGetInputlstPointX().size()==bbGetInputlstPointZ().size()) )
+ // Removing actors
+ int iActor,sizeActors = vecVtkActors.size();
+ for (iActor=0 ; iActor<sizeActors; iActor++)
{
- int iGeneral=0;
- std::vector<int> lstIndexs = bbGetInputlstIndexs();
- if ( bbGetInputlstIndexs().size()==0 )
- {
- //EED printf("2 ");
- lstIndexs.push_back( bbGetInputlstPointX().size() );
+ if (bbGetInputRenderer()!=NULL )
+ {
+ bbGetInputRenderer()->RemoveActor( vecVtkActors[iActor] );
+ vecVtkPolyData[iActor]->Delete();
+ vecVtkPolyDataMaper[iActor]->Delete();
+ vecVtkActors[iActor]->Delete();
} // if
- int iAxis,sizeLstAxis=lstIndexs.size();
- int iActor,sizeActors = vecVtkActors.size();
- int numPoints;
-
- //EED printf("3 ");
-
- // if (oldLstSize!=sizeLstAxis)
- // {
- // oldLstSize=sizeLstAxis;
- for (iActor=0 ; iActor<sizeActors; iActor++)
- {
- //EED printf("4-%d ",iActor);
- if (bbGetInputRenderer()!=NULL )
- {
- //EED printf("5 ");
- bbGetInputRenderer()->RemoveActor( vecVtkActors[iActor] );
- vecVtkPolyData[iActor]->Delete();
- vecVtkPolyDataMaper[iActor]->Delete();
- vecVtkActors[iActor]->Delete();
- //EED printf("6 ");
- } // if
- } // for iActor
- vecVtkPolyData.clear();
- vecVtkPolyDataMaper.clear();
- vecVtkActors.clear();
- //EED printf("7 ");
- for ( iAxis=0 ; iAxis<sizeLstAxis ; iAxis++)
- {
- //EED printf("8(%d) ",iAxis);
- numPoints = lstIndexs[iAxis];
- //EED printf("9(%d) ",iAxis);
- DrawOneAxis(iGeneral,numPoints,iAxis);
- //EED printf("10 ");
- iGeneral = iGeneral+numPoints;
- // if ((iAxis % 1)==0)
- // {
- // printf("EED DrawAxisTree3D::Process %d/%d\n", iAxis,sizeLstAxis );
- // }
- } // for iAxis
-
- //EED printf("11 ");
-
- if ( bbGetInputiAxis() < (int)(vecVtkActors.size() ) )
- {
- bbSetOutputOutAxis( vecVtkActors[ bbGetInputiAxis() ] );
- } else {
- printf("DrawAxisTree3D .ERROR. iAxis for exist in actors vector ...\n");
- } // if
- // } else {// if oldLstSize
- // } // if oldLstSize
- } else {
- printf("\nDrawAxisTree3D .ERROR. size of vectors lstPointX.size=%d lstPointY.size=%d lstPointZ.size=%d are not coherent \n\n",bbGetInputlstPointX().size(), bbGetInputlstPointY().size(), bbGetInputlstPointZ().size() );
- }// size X Y Z
+ } // for iActor
+ vecVtkPolyData.clear();
+ vecVtkPolyDataMaper.clear();
+ vecVtkActors.clear();
+
+ // Adding actors
+ if (bbGetInputActive()==true)
+ {
+ if ( (bbGetInputlstPointX().size()==bbGetInputlstPointY().size()) &&
+ (bbGetInputlstPointX().size()==bbGetInputlstPointZ().size()) )
+ {
+ int iGeneral=0;
+ std::vector<int> lstIndexs = bbGetInputlstIndexs();
+ if ( bbGetInputlstIndexs().size()==0 )
+ {
+ lstIndexs.push_back( bbGetInputlstPointX().size() );
+ } // if
+ int iAxis,sizeLstAxis=lstIndexs.size();
+ int numPoints;
+ for ( iAxis=0 ; iAxis<sizeLstAxis ; iAxis++)
+ {
+ numPoints = lstIndexs[iAxis];
+ DrawOneAxis(iGeneral,numPoints,iAxis);
+ iGeneral = iGeneral+numPoints;
+ } // for iAxis
+ if ( bbGetInputiAxis() < (int)(vecVtkActors.size() ) )
+ {
+ bbSetOutputOutAxis( vecVtkActors[ bbGetInputiAxis() ] );
+ } else {
+ printf("DrawAxisTree3D .ERROR. iAxis for exist in actors vector ...\n");
+ } // if
+ } else {
+ printf("\nDrawAxisTree3D .ERROR. size of vectors lstPointX.size=%d lstPointY.size=%d lstPointZ.size=%d are not coherent \n\n",bbGetInputlstPointX().size(), bbGetInputlstPointY().size(), bbGetInputlstPointZ().size() );
+ }// size X Y Z
+ } // if Active
printf("DrawAxisTree3D::Process End \n");
}
void DrawAxisTree3D::bbUserSetDefaultValues()
{
oldLstSize=-1;
- bbSetInputiAxis(0);
std::vector<double> colour;
// 1- red
colour.push_back(1.0);
colour.push_back(0.5);
colour.push_back(0.5);
+ bbSetInputActive(true);
+ bbSetInputiAxis(0);
bbSetInputColour(colour);
bbSetInputOpacity(1);
bbSetInputLineWidth(0.5);
public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(DrawAxisTree3D,bbtk::AtomicBlackBox);
+ BBTK_DECLARE_INPUT(Active , bool);
BBTK_DECLARE_INPUT(Renderer , vtkRenderer*);
BBTK_DECLARE_INPUT(lstIndexs , std::vector<int>);
BBTK_DECLARE_INPUT(lstPointX , std::vector<double>);
BBTK_AUTHOR("InfoTeam CREATIS-LRMN");
BBTK_DESCRIPTION("Draw Axis Tree 3D");
BBTK_CATEGORY("actor");
+ BBTK_INPUT(DrawAxisTree3D,Active,"(default true) true/false",bool,"");
BBTK_INPUT(DrawAxisTree3D,Renderer,"Renderer",vtkRenderer*,"");
BBTK_INPUT(DrawAxisTree3D,lstIndexs,"Indexs",std::vector<int>,"");
BBTK_INPUT(DrawAxisTree3D,lstPointX,"lstPointX",std::vector<double>,"");
std::vector<int> *nTypeView)
:wxMaracas_N_ViewersWidget(parent,imagedata,nTypeView)
{
- mbbViewerNV=box;
- backX=-9999;
- backY=-9999;
- backZ=-9999;
+ mbbViewerNV = box;
+ backX = -9999;
+ backY = -9999;
+ backZ = -9999;
}
//-------------------------------------------------------------
#else
- double colorWindow = _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetColorWindow();
- double colorLevel = _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetColorLevel();
+// double colorWindow = _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetColorWindow();
+// double colorLevel = _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetColorLevel();
double spc[3];
vtkImageData *image = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
_planeWidgetY->SetSlicePosition( y*spc[1] );
_planeWidgetZ->SetSlicePosition( z*spc[2] );
+ _planeWidgetX->GetTexture()->SetInterpolate( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetInterpolate() );
+ _planeWidgetY->GetTexture()->SetInterpolate( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetInterpolate() );
+ _planeWidgetZ->GetTexture()->SetInterpolate( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetInterpolate() );
+
+
// -- Plane widget
_probe->SetSourceData( imageData );
#endif