bbUserFinalizeProcessing();
result = vtkTransform::New();
result->Update();
+ resultInverse = vtkTransform::New();
+ resultInverse->Update();
}
// --------------------------------------------------------------
// --------------------------------------------------------------
void Transform::Process()
{
+ printf("EED Transform::Process Start\n ");
+
bbUserInitializeProcessing();
if (bbGetInputIn()!=NULL)
{
result->RotateWXYZ(bbGetInputRotateWXYZ()[0],bbGetInputRotateWXYZ()[1], bbGetInputRotateWXYZ()[2], bbGetInputRotateWXYZ()[3]);
}
- bbSetOutputOut(result);
+ if (bbGetInputInverse()==false)
+ {
+ bbSetOutputOut(result);
+ } else {
+ vtkMatrix4x4 *matrix;
+ matrix=vtkMatrix4x4::New();
+ result->GetInverse(matrix);
+ resultInverse->SetMatrix( matrix );
+ bbSetOutputOut(resultInverse);
+ } // if Inverse
+ printf("EED Transform::Process End\n ");
}
-}
-// EO namespace bbvtk
+
+}// EO namespace bbvtk
public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(Transform,bbtk::AtomicBlackBox);
+ BBTK_DECLARE_INPUT(Inverse,bool);
BBTK_DECLARE_INPUT(In,vtkLinearTransform *);
BBTK_DECLARE_INPUT(Scale,std::vector<double>);
BBTK_DECLARE_INPUT(RotateWXYZ,std::vector<double>);
std::vector<double> vecRotateWXYZ;
std::vector<double> vecTranslate;
std::vector<double> vecSpacing;
- vtkTransform *result;
+ vtkTransform *result;
+ vtkTransform *resultInverse;
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(Transform,bbtk::AtomicBlackBox);
BBTK_DESCRIPTION("vtkTransform");
BBTK_CATEGORY("math");
+ BBTK_INPUT(Transform,Inverse,"(default false) true/false",bool,"");
BBTK_INPUT(Transform,In,"vtkTransform to be concatenate",vtkLinearTransform *,"");
BBTK_INPUT(Transform,Scale,"vector with sx sy sz",std::vector<double>,"");
BBTK_INPUT(Transform,Translate,"vector with x y z",std::vector<double>,"");