X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkTransform.cxx;h=fd0d369cde740fa8a3318d603806dec4422732cf;hb=29a64ec37c5dc46cc05277a4f7358a77026bfbda;hp=829cd7e60ec3b100f4eb00aa09d72f5237e7d468;hpb=cfad95b6e08e6e53846ffcda7fbc5932065f2c47;p=bbtk.git diff --git a/packages/vtk/src/bbvtkTransform.cxx b/packages/vtk/src/bbvtkTransform.cxx index 829cd7e..fd0d369 100644 --- a/packages/vtk/src/bbvtkTransform.cxx +++ b/packages/vtk/src/bbvtkTransform.cxx @@ -67,6 +67,7 @@ namespace bbvtk { bbUserFinalizeProcessing(); result = vtkTransform::New(); + result->Update(); } // -------------------------------------------------------------- @@ -79,40 +80,33 @@ namespace bbvtk } } + // -------------------------------------------------------------- void Transform::Process() { - printf("EED %p Transform::Process() 1\n", this); bbUserInitializeProcessing(); if (bbGetInputIn()!=NULL) { result->Concatenate( bbGetInputIn()->GetMatrix() ); - printf("EED %p Transform::Process() 2\n", this); } - if (bbGetInputScale().size()>=3) - { - result->Scale(bbGetInputScale()[0], bbGetInputScale()[1], bbGetInputScale()[2]); - printf("EED %p Transform::Process() 3\n", this); - } - if ((bbGetInputTranslate().size()>=3) && (bbGetInputSpacing().size()>=3)) { double tx = bbGetInputTranslate()[0] * bbGetInputSpacing()[0]; double ty = bbGetInputTranslate()[1] * bbGetInputSpacing()[1]; double tz = bbGetInputTranslate()[2] * bbGetInputSpacing()[2]; result->Translate(tx,ty,tz); - printf("EED %p Transform::Process() 4\n", this); + } + + if (bbGetInputScale().size()>=3) + { + result->Scale(bbGetInputScale()[0], bbGetInputScale()[1], bbGetInputScale()[2]); } if (bbGetInputRotateWXYZ().size()>=4) { result->RotateWXYZ(bbGetInputRotateWXYZ()[0],bbGetInputRotateWXYZ()[1], bbGetInputRotateWXYZ()[2], bbGetInputRotateWXYZ()[3]); - printf("EED %p Transform::Process() 5\n", this); } - - result->Update(); - printf("EED %p Transform::Process() 6\n", this); bbSetOutputOut(result); }