ITK IO Mesh OBJ

Hi everybody,

The reader is still broken (https://issues.itk.org/jira/browse/ITK-2883#comment-27666)

I developed a fix for the vectornormal issue.

… I just need to figure out on how to submit, since gerrit does not work for my superbuild. :frowning:

Cheers
David

0001-BUG-itkOBJMeshIO-did-only-load-meshes-properly-if-th.patch (4.9 KB)

uploaded the patch

Hi David,

Thank you for the patch!

Uploaded to Gerrit here: http://review.source.kitware.com/#/c/22807/

Thanks,
Matt

@david.kuegler You can make a normal checkout of ITK, and set it up for development. Then do git fetch http://review.source.kitware.com/ITK refs/changes/07/22807/1 && git checkout FETCH_HEAD to get the first version of you patch and after you have made changes git commit --amend and git gerrit-push.

As you might realize, ITK is still supporting old compilers and therefore can’t have C++11 features such as auto.

1 Like

Unfortunately git does not cooperate (The repo has just been created by a checkout and setup…).

$ git fetch http://review.source.kitware.com/ITK refs/changes/07/22807/1 && git checkout FETCH_HEAD
From http://review.source.kitware.com/ITK

  • branch refs/changes/07/22807/1 -> FETCH_HEAD
    error: Your local changes to the following files would be overwritten by checkout:
    Modules/IO/Mesh/src/itkOBJMeshIO.cxx
    Please commit your changes or stash them before you switch branches.
    Aborting

That is itkOBJMeshIO.cxx does not have any changes from top…

Since I spent way too much time trying to get gerrit to work, just patches again.

0001-BUG-itkOBJMeshIO-did-only-load-meshes-properly-if-th.patch (4.9 KB)

0002-BUG-itkOBJMeshIO-did-only-load-meshes-properly-if-th.patch (2.4 KB)

The updated patch is here. The new list of errors from my local Linux machine are below.

/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx: In member function ‘virtual void itk::OBJMeshIO::ReadMeshInformation()’:
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx:128:39: error: ‘find_if_not’ is not a member of ‘std’
     std::string::iterator starttype = std::find_if_not(line.begin(), line.end(), [&loc](const char l) { return std::isspace(l, loc); });
                                       ^
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx:128:134: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
     std::string::iterator starttype = std::find_if_not(line.begin(), line.end(), [&loc](const char l) { return std::isspace(l, loc); });
                                                                                                                                      ^
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx: In member function ‘virtual void itk::OBJMeshIO::ReadPoints(void*)’:
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx:231:39: error: ‘find_if_not’ is not a member of ‘std’
     std::string::iterator starttype = std::find_if_not(line.begin(), line.end(), [&loc](const char l) { return std::isspace(l, loc); });
                                       ^
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx:231:134: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
     std::string::iterator starttype = std::find_if_not(line.begin(), line.end(), [&loc](const char l) { return std::isspace(l, loc); });
                                                                                                                                      ^
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx: In member function ‘virtual void itk::OBJMeshIO::ReadCells(void*)’:
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx:279:39: error: ‘find_if_not’ is not a member of ‘std’
     std::string::iterator starttype = std::find_if_not(line.begin(), line.end(), [&loc](const char l) { return std::isspace(l, loc); });
                                       ^
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx:279:134: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
     std::string::iterator starttype = std::find_if_not(line.begin(), line.end(), [&loc](const char l) { return std::isspace(l, loc); });
                                                                                                                                      ^
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx: In member function ‘virtual void itk::OBJMeshIO::ReadPointData(void*)’:
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx:351:39: error: ‘find_if_not’ is not a member of ‘std’
     std::string::iterator starttype = std::find_if_not(line.begin(), line.end(), [&loc](const char l) { return std::isspace(l, loc); });
                                       ^
/home/dzenan/ITK-git/Modules/IO/Mesh/src/itkOBJMeshIO.cxx:351:134: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
     std::string::iterator starttype = std::find_if_not(line.begin(), line.end(), [&loc](const char l) { return std::isspace(l, loc); });
                                                                                                                                      ^

Well, c++11 makes everything so nice :wink: you get used to it…
So this should be independent of c++11 now. It works on my test file again, so I hope it would generally work…

0002-BUG-itkOBJMeshIO-did-only-load-meshes-properly-if-th.patch (9.0 KB)

2 Likes

It now compiles on my local Linux box. I pushed a new patch set.

1 Like