diff --git a/Components/Metrics/MissingStructurePenalty/elxMissingStructurePenalty.h b/Components/Metrics/MissingStructurePenalty/elxMissingStructurePenalty.h index 327dfcb08..53d9b4272 100644 --- a/Components/Metrics/MissingStructurePenalty/elxMissingStructurePenalty.h +++ b/Components/Metrics/MissingStructurePenalty/elxMissingStructurePenalty.h @@ -162,7 +162,7 @@ class ITK_TEMPLATE_EXPORT MissingStructurePenalty ReadMesh(const std::string & meshFileName, typename FixedMeshType::Pointer & mesh); void - WriteResultMesh(const char * filename, MeshIdType meshId); + WriteResultMesh(const std::string & filename, MeshIdType meshId); unsigned int ReadTransformixPoints(const std::string & filename, typename MeshType::Pointer & mesh); diff --git a/Components/Metrics/MissingStructurePenalty/elxMissingStructurePenalty.hxx b/Components/Metrics/MissingStructurePenalty/elxMissingStructurePenalty.hxx index 99340f14d..b335cfa7e 100644 --- a/Components/Metrics/MissingStructurePenalty/elxMissingStructurePenalty.hxx +++ b/Components/Metrics/MissingStructurePenalty/elxMissingStructurePenalty.hxx @@ -212,7 +212,7 @@ MissingStructurePenalty::AfterEachIteration() try { - this->WriteResultMesh(makeFileName.str().c_str(), meshId); + this->WriteResultMesh(makeFileName.str(), meshId); } catch (const itk::ExceptionObject & excp) { @@ -261,7 +261,7 @@ MissingStructurePenalty::AfterEachResolution() try { - this->WriteResultMesh(makeFileName.str().c_str(), meshId); + this->WriteResultMesh(makeFileName.str(), meshId); } catch (const itk::ExceptionObject & excp) { @@ -309,7 +309,7 @@ MissingStructurePenalty::ReadMesh(const std::string & meshFileName, ty template void -MissingStructurePenalty::WriteResultMesh(const char * filename, MeshIdType meshId) +MissingStructurePenalty::WriteResultMesh(const std::string & filename, MeshIdType meshId) { /** Setup the pipeline. */ diff --git a/Components/Metrics/PolydataDummyPenalty/elxPolydataDummyPenalty.h b/Components/Metrics/PolydataDummyPenalty/elxPolydataDummyPenalty.h index 00b674640..86108f3e3 100644 --- a/Components/Metrics/PolydataDummyPenalty/elxPolydataDummyPenalty.h +++ b/Components/Metrics/PolydataDummyPenalty/elxPolydataDummyPenalty.h @@ -182,7 +182,7 @@ class ITK_TEMPLATE_EXPORT PolydataDummyPenalty ReadMesh(const std::string & meshFileName, typename FixedMeshType::Pointer & mesh); void - WriteResultMesh(const char * filename, MeshIdType meshId); + WriteResultMesh(const std::string & filename, MeshIdType meshId); unsigned int ReadTransformixPoints(const std::string & filename, typename MeshType::Pointer & mesh); diff --git a/Components/Metrics/PolydataDummyPenalty/elxPolydataDummyPenalty.hxx b/Components/Metrics/PolydataDummyPenalty/elxPolydataDummyPenalty.hxx index ccf141cc0..d3f4a569b 100644 --- a/Components/Metrics/PolydataDummyPenalty/elxPolydataDummyPenalty.hxx +++ b/Components/Metrics/PolydataDummyPenalty/elxPolydataDummyPenalty.hxx @@ -201,7 +201,7 @@ PolydataDummyPenalty::AfterEachIteration() try { - this->WriteResultMesh(makeFileName.str().c_str(), meshId); + this->WriteResultMesh(makeFileName.str(), meshId); } catch (const itk::ExceptionObject & excp) { @@ -250,7 +250,7 @@ PolydataDummyPenalty::AfterEachResolution() try { - this->WriteResultMesh(makeFileName.str().c_str(), meshId); + this->WriteResultMesh(makeFileName.str(), meshId); } catch (const itk::ExceptionObject & excp) { @@ -300,7 +300,7 @@ PolydataDummyPenalty::ReadMesh(const std::string & meshFileName, typen template void -PolydataDummyPenalty::WriteResultMesh(const char * filename, MeshIdType meshId) +PolydataDummyPenalty::WriteResultMesh(const std::string & filename, MeshIdType meshId) { /** Set the points of the latest transformation. */ const MappedMeshContainerPointer mappedMeshContainer = this->GetModifiableMappedMeshContainer();