+//------------------------------------------------------------------------------
+QString vvMainWindow::Get4x4MatrixDoubleAsString(vtkSmartPointer<vtkMatrix4x4> matrix)
+{
+ std::ostringstream strmatrix;
+
+ for (unsigned int i = 0; i < 4; i++) {
+ for (unsigned int j = 0; j < 4; j++) {
+ strmatrix.flags(ios::showpos);
+ strmatrix.width(10);
+ strmatrix.precision(3);
+ strmatrix.setf(ios::fixed,ios::floatfield);
+ strmatrix.fill(' ');
+ strmatrix << std::left << matrix->GetElement(i, j);
+ //strmatrix.width(10);
+ strmatrix << " ";
+ }
+ strmatrix << std::endl;
+ }
+ QString result = strmatrix.str().c_str();
+ return result;
+}
+//------------------------------------------------------------------------------
+