X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkTransformUtilities.h;h=562ed63a67e11facfdcc07ff960fd5456394613a;hb=7d4e77191e55f668f316ba3ddf0fddb63e59bd25;hp=cbc30b97ac806aa0cd3c91d531dc4cac082bd2e8;hpb=cedcf4f412f2a3e6635d546c2b9c678022497535;p=clitk.git diff --git a/common/clitkTransformUtilities.h b/common/clitkTransformUtilities.h index cbc30b9..562ed63 100644 --- a/common/clitkTransformUtilities.h +++ b/common/clitkTransformUtilities.h @@ -23,6 +23,7 @@ #include "itkPoint.h" #include "clitkImageCommon.h" #include "clitkCommon.h" +#define VTK_EXCLUDE_STRSTREAM_HEADERS #include #include @@ -255,29 +256,7 @@ namespace clitk return matrix; } - inline itk::Matrix ReadMatrix3D(std::string fileName) - { - // read input matrix - std::ifstream is; - openFileForReading(is, fileName); - std::vector nb; - double x; - skipComment(is); - is >> x; - while (!is.eof()) { - nb.push_back(x); - skipComment(is); - is >> x; - } - - //copy it to the matrix - itk::Matrix matrix; - unsigned int index=0; - for (unsigned int i=0;i<4;i++) - for (unsigned int j=0;j<4;j++) - matrix[i][j]=nb[index++]; - return matrix; - } + itk::Matrix ReadMatrix3D(std::string fileName); inline vtkMatrix4x4* ReadVTKMatrix3D(std::string fileName) { // read input matrix