Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
e8991c64
Commit
e8991c64
authored
Feb 06, 2012
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX
#129
] switched completely to filesystem 3.
parent
ca5a285d
Changes
47
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
105 additions
and
195 deletions
+105
-195
src/core/common/WIOTools.cpp
src/core/common/WIOTools.cpp
+4
-8
src/core/common/WIOTools.h
src/core/common/WIOTools.h
+10
-5
src/core/common/WPathHelper.h
src/core/common/WPathHelper.h
+0
-4
src/core/common/WPropertyBase.cpp
src/core/common/WPropertyBase.cpp
+0
-4
src/core/common/WPropertyTypes.h
src/core/common/WPropertyTypes.h
+0
-4
src/core/common/WSharedLib.cpp
src/core/common/WSharedLib.cpp
+1
-5
src/core/common/WSharedLib.h
src/core/common/WSharedLib.h
+0
-4
src/core/common/test/WIOTools_test.h
src/core/common/test/WIOTools_test.h
+1
-1
src/core/dataHandler/WDataSetFibers.cpp
src/core/dataHandler/WDataSetFibers.cpp
+0
-4
src/core/dataHandler/io/WWriter.cpp
src/core/dataHandler/io/WWriter.cpp
+0
-4
src/core/dataHandler/io/WWriterDendrogram.cpp
src/core/dataHandler/io/WWriterDendrogram.cpp
+1
-5
src/core/dataHandler/io/WWriterDendrogram.h
src/core/dataHandler/io/WWriterDendrogram.h
+0
-4
src/core/dataHandler/io/WWriterFiberVTK.cpp
src/core/dataHandler/io/WWriterFiberVTK.cpp
+1
-5
src/core/dataHandler/io/WWriterFiberVTK.h
src/core/dataHandler/io/WWriterFiberVTK.h
+0
-4
src/core/graphicsEngine/WGEGeodeUtils.cpp
src/core/graphicsEngine/WGEGeodeUtils.cpp
+1
-1
src/core/graphicsEngine/WGETextureHud.cpp
src/core/graphicsEngine/WGETextureHud.cpp
+1
-1
src/core/graphicsEngine/shaders/WGEShader.cpp
src/core/graphicsEngine/shaders/WGEShader.cpp
+5
-9
src/core/graphicsEngine/shaders/WGEShader.h
src/core/graphicsEngine/shaders/WGEShader.h
+0
-4
src/core/graphicsEngine/widgets/labeling/WGELabel.cpp
src/core/graphicsEngine/widgets/labeling/WGELabel.cpp
+1
-1
src/core/kernel/WKernel.cpp
src/core/kernel/WKernel.cpp
+0
-5
src/core/kernel/WModule.h
src/core/kernel/WModule.h
+0
-4
src/core/kernel/WModuleLoader.cpp
src/core/kernel/WModuleLoader.cpp
+6
-6
src/core/kernel/WModuleLoader.h
src/core/kernel/WModuleLoader.h
+0
-4
src/core/kernel/WProjectFile.cpp
src/core/kernel/WProjectFile.cpp
+6
-6
src/core/kernel/WProjectFile.h
src/core/kernel/WProjectFile.h
+0
-4
src/modules/atlasCreator/WMAtlasCreator.cpp
src/modules/atlasCreator/WMAtlasCreator.cpp
+5
-9
src/modules/clusterDisplay/WMClusterDisplay.cpp
src/modules/clusterDisplay/WMClusterDisplay.cpp
+1
-1
src/modules/clusterDisplayVoxels/WFileParser.cpp
src/modules/clusterDisplayVoxels/WFileParser.cpp
+0
-4
src/modules/coordinateSystem/WRulerOrtho.cpp
src/modules/coordinateSystem/WRulerOrtho.cpp
+1
-1
src/modules/data/WMWriteNIfTI.cpp
src/modules/data/WMWriteNIfTI.cpp
+2
-2
src/modules/fiberTranslator/WMFiberTranslator.cpp
src/modules/fiberTranslator/WMFiberTranslator.cpp
+8
-8
src/modules/histogramView/WMHistogramView.cpp
src/modules/histogramView/WMHistogramView.cpp
+4
-4
src/modules/hud/WMHud.cpp
src/modules/hud/WMHud.cpp
+1
-1
src/modules/readMesh/WMReadMesh.cpp
src/modules/readMesh/WMReadMesh.cpp
+4
-4
src/modules/readRawData/WMReadRawData.cpp
src/modules/readRawData/WMReadRawData.cpp
+1
-1
src/modules/schmahmannPandyaSlices/boundaryCurvesWMGM/WBoundaryFragments.h
...hmannPandyaSlices/boundaryCurvesWMGM/WBoundaryFragments.h
+0
-4
src/modules/splineSurface/WMSplineSurface.cpp
src/modules/splineSurface/WMSplineSurface.cpp
+2
-2
src/modules/template/WMTemplate.cpp
src/modules/template/WMTemplate.cpp
+1
-1
src/modules/webglSupport/WMWebglSupport.cpp
src/modules/webglSupport/WMWebglSupport.cpp
+12
-15
src/modules/writeGeometry/WMWriteGeometry.cpp
src/modules/writeGeometry/WMWriteGeometry.cpp
+2
-2
src/modules/writeMesh/WMWriteMesh.cpp
src/modules/writeMesh/WMWriteMesh.cpp
+4
-4
src/modules/writeMesh/test/WMWriteMesh_test.h
src/modules/writeMesh/test/WMWriteMesh_test.h
+2
-2
src/modules/writeTracts/WMWriteTracts.cpp
src/modules/writeTracts/WMWriteTracts.cpp
+8
-8
src/qt4gui/qt4/WMainWindow.cpp
src/qt4gui/qt4/WMainWindow.cpp
+4
-4
src/qt4gui/qt4/WQt4Gui.cpp
src/qt4gui/qt4/WQt4Gui.cpp
+0
-4
src/qt4gui/qt4/WQtModuleConfig.cpp
src/qt4gui/qt4/WQtModuleConfig.cpp
+0
-3
src/qt4gui/qt4/controlPanel/WPropertyFilenameWidget.cpp
src/qt4gui/qt4/controlPanel/WPropertyFilenameWidget.cpp
+5
-5
No files found.
src/core/common/WIOTools.cpp
View file @
e8991c64
...
...
@@ -26,10 +26,6 @@
#include <streambuf>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "exceptions/WFileNotFound.h"
...
...
@@ -43,11 +39,11 @@ std::string readFileIntoString( const std::string& name )
std
::
string
readFileIntoString
(
const
boost
::
filesystem
::
path
&
path
)
{
std
::
string
filename
=
path
.
file_
string
();
std
::
string
filename
=
path
.
string
();
std
::
ifstream
input
(
filename
.
c_str
()
);
if
(
!
input
.
is_open
()
)
{
throw
WFileNotFound
(
std
::
string
(
"The file
\"
"
)
+
boost
::
filesystem
::
complete
(
path
).
file_
string
()
+
std
::
string
(
"
\"
does not exist."
)
);
throw
WFileNotFound
(
std
::
string
(
"The file
\"
"
)
+
path
.
string
()
+
std
::
string
(
"
\"
does not exist."
)
);
}
// preallocate space for the string.
...
...
@@ -69,10 +65,10 @@ void writeStringIntoFile( const std::string& name, const std::string& content )
void
writeStringIntoFile
(
const
boost
::
filesystem
::
path
&
path
,
const
std
::
string
&
content
)
{
std
::
ofstream
outfile
(
path
.
file_
string
().
c_str
()
);
std
::
ofstream
outfile
(
path
.
string
().
c_str
()
);
if
(
!
outfile
.
is_open
()
)
{
throw
WFileOpenFailed
(
"The file
\"
"
+
boost
::
filesystem
::
complete
(
path
).
file_
string
()
+
"
\"
could not be opened."
);
throw
WFileOpenFailed
(
"The file
\"
"
+
path
.
string
()
+
"
\"
could not be opened."
);
}
outfile
<<
content
<<
std
::
flush
;
...
...
src/core/common/WIOTools.h
View file @
e8991c64
...
...
@@ -30,10 +30,6 @@
#include <algorithm>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "WExportCommon.h"
...
...
@@ -92,13 +88,22 @@ template< class T > void switchByteOrderOfArray( T *array, const size_t arraySiz
}
}
/**
* \param name File name to get the extension or suffix from.
* \return filename suffix
*/
inline
std
::
string
getSuffix
(
boost
::
filesystem
::
path
name
)
{
return
name
.
extension
().
string
();
}
/**
* \param name File name to get the extension or suffix from.
* \return filename suffix
*/
inline
std
::
string
getSuffix
(
std
::
string
name
)
{
return
boost
::
filesystem
::
path
(
name
).
extension
(
);
return
getSuffix
(
boost
::
filesystem
::
path
(
name
)
);
}
/**
...
...
src/core/common/WPathHelper.h
View file @
e8991c64
...
...
@@ -27,10 +27,6 @@
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
src/core/common/WPropertyBase.cpp
View file @
e8991c64
...
...
@@ -25,10 +25,6 @@
#include <list>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "exceptions/WPropertyNameMalformed.h"
...
...
src/core/common/WPropertyTypes.h
View file @
e8991c64
...
...
@@ -32,10 +32,6 @@
#include <vector>
#include <utility>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp>
...
...
src/core/common/WSharedLib.cpp
View file @
e8991c64
...
...
@@ -31,10 +31,6 @@
#include <windows.h> // NOLINT
#endif
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "exceptions/WLibraryFetchFailed.h"
...
...
@@ -243,7 +239,7 @@ struct WSharedLib::data
#endif
WSharedLib
::
WSharedLib
(
boost
::
filesystem
::
path
lib
)
:
m_data
(
new
data
(
lib
.
native_file_
string
()
)
)
m_data
(
new
data
(
lib
.
string
()
)
)
{
}
...
...
src/core/common/WSharedLib.h
View file @
e8991c64
...
...
@@ -28,10 +28,6 @@
#include <algorithm>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "WExportCommon.h"
...
...
src/core/common/test/WIOTools_test.h
View file @
e8991c64
...
...
@@ -105,7 +105,7 @@ public:
boost
::
filesystem
::
path
fpath
=
tempFileName
();
writeStringIntoFile
(
fpath
,
content
);
std
::
ifstream
input
(
fpath
.
file_
string
().
c_str
()
);
std
::
ifstream
input
(
fpath
.
string
().
c_str
()
);
std
::
string
actual
;
actual
.
assign
(
(
std
::
istreambuf_iterator
<
char
>
(
input
)
),
std
::
istreambuf_iterator
<
char
>
()
);
input
.
close
();
...
...
src/core/dataHandler/WDataSetFibers.cpp
View file @
e8991c64
...
...
@@ -28,10 +28,6 @@
#include <utility>
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem/fstream.hpp>
#include <boost/lexical_cast.hpp>
...
...
src/core/dataHandler/io/WWriter.cpp
View file @
e8991c64
...
...
@@ -24,10 +24,6 @@
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include "../../common/WIOTools.h"
...
...
src/core/dataHandler/io/WWriterDendrogram.cpp
View file @
e8991c64
...
...
@@ -25,10 +25,6 @@
#include <fstream>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
@@ -39,7 +35,7 @@
#include "WWriterDendrogram.h"
WWriterDendrogram
::
WWriterDendrogram
(
const
boost
::
filesystem
::
path
&
path
,
bool
overwrite
)
:
WWriter
(
path
.
file_
string
(),
overwrite
)
:
WWriter
(
path
.
string
(),
overwrite
)
{
}
...
...
src/core/dataHandler/io/WWriterDendrogram.h
View file @
e8991c64
...
...
@@ -27,10 +27,6 @@
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
src/core/dataHandler/io/WWriterFiberVTK.cpp
View file @
e8991c64
...
...
@@ -25,10 +25,6 @@
#include <fstream>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
@@ -39,7 +35,7 @@
#include "WWriterFiberVTK.h"
WWriterFiberVTK
::
WWriterFiberVTK
(
const
boost
::
filesystem
::
path
&
path
,
bool
overwrite
)
:
WWriter
(
path
.
file_
string
(),
overwrite
)
:
WWriter
(
path
.
string
(),
overwrite
)
{
}
void
WWriterFiberVTK
::
writeFibs
(
boost
::
shared_ptr
<
const
WDataSetFibers
>
fiberDS
)
const
...
...
src/core/dataHandler/io/WWriterFiberVTK.h
View file @
e8991c64
...
...
@@ -27,10 +27,6 @@
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
src/core/graphicsEngine/WGEGeodeUtils.cpp
View file @
e8991c64
...
...
@@ -388,7 +388,7 @@ osg::ref_ptr< osg::PositionAttitudeTransform > wge::addLabel( osg::Vec3 position
labelGeode
->
addDrawable
(
label
);
// setup font
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
file_
string
()
);
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
string
()
);
label
->
setBackdropType
(
osgText
::
Text
::
OUTLINE
);
label
->
setCharacterSize
(
6
);
...
...
src/core/graphicsEngine/WGETextureHud.cpp
View file @
e8991c64
...
...
@@ -261,7 +261,7 @@ WGETextureHud::WGETextureHudEntry::WGETextureHudEntry( osg::ref_ptr< osg::Textur
state
->
setMode
(
GL_DEPTH_TEST
,
osg
::
StateAttribute
::
OFF
);
addChild
(
textGeode
);
osgText
::
Text
*
label
=
new
osgText
::
Text
();
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
file_
string
()
);
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
string
()
);
label
->
setBackdropType
(
osgText
::
Text
::
OUTLINE
);
label
->
setCharacterSize
(
15
);
label
->
setText
(
m_name
);
...
...
src/core/graphicsEngine/shaders/WGEShader.cpp
View file @
e8991c64
...
...
@@ -29,10 +29,6 @@
#include <fstream>
#include <boost/algorithm/string.hpp>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/lexical_cast.hpp>
...
...
@@ -242,9 +238,9 @@ std::string WGEShader::processShaderRecursive( const std::string filename, bool
// use one of the following paths
std
::
string
fn
=
filename
;
std
::
string
fnLocal
=
(
m_shaderPath
/
filename
).
file_
string
();
std
::
string
fnLocalShaders
=
(
m_shaderPath
/
"shaders"
/
filename
).
file_
string
();
std
::
string
fnGlobal
=
(
WPathHelper
::
getShaderPath
()
/
filename
).
file_
string
();
std
::
string
fnLocal
=
(
m_shaderPath
/
filename
).
string
();
std
::
string
fnLocalShaders
=
(
m_shaderPath
/
"shaders"
/
filename
).
string
();
std
::
string
fnGlobal
=
(
WPathHelper
::
getShaderPath
()
/
filename
).
string
();
if
(
boost
::
filesystem
::
exists
(
m_shaderPath
/
filename
)
)
{
...
...
@@ -261,8 +257,8 @@ std::string WGEShader::processShaderRecursive( const std::string filename, bool
else
if
(
!
optional
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"The requested shader
\"
"
+
filename
+
"
\"
does not exist in
\"
"
+
m_shaderPath
.
file_string
()
+
"
\"
,
\"
"
+
(
m_shaderPath
/
"shaders"
).
file_
string
()
+
"
\"
or
\"
"
+
WPathHelper
::
getShaderPath
().
file_
string
()
+
"
\"
."
,
"WGEShader ("
+
filename
+
")"
,
LL_ERROR
m_shaderPath
.
string
()
+
"
\"
,
\"
"
+
(
m_shaderPath
/
"shaders"
).
string
()
+
"
\"
or
\"
"
+
WPathHelper
::
getShaderPath
().
string
()
+
"
\"
."
,
"WGEShader ("
+
filename
+
")"
,
LL_ERROR
);
return
""
;
...
...
src/core/graphicsEngine/shaders/WGEShader.h
View file @
e8991c64
...
...
@@ -28,10 +28,6 @@
#include <map>
#include <string>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/signals2/signal.hpp>
...
...
src/core/graphicsEngine/widgets/labeling/WGELabel.cpp
View file @
e8991c64
...
...
@@ -33,7 +33,7 @@ WGELabel::WGELabel():
{
// initialize members
setCharacterSize
(
21
);
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
file_
string
()
);
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
string
()
);
setAxisAlignment
(
osgText
::
Text
::
SCREEN
);
setAlignment
(
osgText
::
Text
::
LEFT_BOTTOM
);
setBackdropType
(
osgText
::
Text
::
OUTLINE
);
...
...
src/core/kernel/WKernel.cpp
View file @
e8991c64
...
...
@@ -33,11 +33,6 @@
#include <string>
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include "../common/WThreadedRunner.h"
#include "../common/WTimer.h"
#include "../common/WRealtimeTimer.h"
...
...
src/core/kernel/WModule.h
View file @
e8991c64
...
...
@@ -30,10 +30,6 @@
#include <vector>
#include <boost/enable_shared_from_this.hpp>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
...
...
src/core/kernel/WModuleLoader.cpp
View file @
e8991c64
...
...
@@ -54,8 +54,8 @@ void WModuleLoader::load( WSharedAssociativeContainer< std::set< boost::shared_p
i
!=
boost
::
filesystem
::
directory_iterator
();
++
i
)
{
// all modules need to begin with this
std
::
string
suffix
=
getSuffix
(
i
->
leaf
()
);
std
::
string
stem
=
i
->
path
().
stem
();
std
::
string
suffix
=
getSuffix
(
i
->
path
()
);
std
::
string
stem
=
i
->
path
().
stem
()
.
string
()
;
#ifdef _MSC_VER
std
::
string
supposedFilename
=
getModulePrefix
()
+
'_'
+
i
->
path
().
parent_path
().
filename
()
...
...
@@ -67,8 +67,8 @@ void WModuleLoader::load( WSharedAssociativeContainer< std::set< boost::shared_p
#endif // _MSC_VER
// we want to strip the search directory from the path
std
::
string
relPath
=
i
->
path
().
file_
string
();
relPath
.
erase
(
0
,
dir
.
file_
string
().
length
()
+
1
);
// NOTE: +1 because we want to remove the "/" too
std
::
string
relPath
=
i
->
path
().
string
();
relPath
.
erase
(
0
,
dir
.
string
().
length
()
+
1
);
// NOTE: +1 because we want to remove the "/" too
// is it a lib? Use a regular expression to check this
// NOTE:: the double \\ is needed to escape the escape char
...
...
@@ -145,12 +145,12 @@ void WModuleLoader::load( WSharedAssociativeContainer< std::set< boost::shared_p
// go through each of the paths
for
(
std
::
vector
<
boost
::
filesystem
::
path
>::
const_iterator
path
=
allPaths
.
begin
();
path
!=
allPaths
.
end
();
++
path
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Searching modules in
\"
"
+
(
*
path
).
file_
string
()
+
"
\"
."
,
"Module Loader"
,
LL_INFO
);
WLogger
::
getLogger
()
->
addLogMessage
(
"Searching modules in
\"
"
+
(
*
path
).
string
()
+
"
\"
."
,
"Module Loader"
,
LL_INFO
);
// does the directory exist?
if
(
!
boost
::
filesystem
::
is_directory
(
*
path
)
||
!
boost
::
filesystem
::
exists
(
*
path
)
)
{
WLogger
::
getLogger
()
->
addLogMessage
(
"Searching modules in
\"
"
+
(
*
path
).
file_
string
()
+
WLogger
::
getLogger
()
->
addLogMessage
(
"Searching modules in
\"
"
+
(
*
path
).
string
()
+
"
\"
failed. It is not a directory or does not exist."
+
" Ignoring."
,
"Module Loader"
,
LL_WARNING
);
...
...
src/core/kernel/WModuleLoader.h
View file @
e8991c64
...
...
@@ -29,10 +29,6 @@
#include <string>
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
src/core/kernel/WProjectFile.cpp
View file @
e8991c64
...
...
@@ -86,13 +86,13 @@ void WProjectFile::load()
void
WProjectFile
::
save
(
const
std
::
vector
<
boost
::
shared_ptr
<
WProjectFileIO
>
>&
writer
)
{
wlog
::
info
(
"Project File"
)
<<
"Saving project file
\"
"
<<
m_project
.
file_
string
()
<<
"
\"
."
;
wlog
::
info
(
"Project File"
)
<<
"Saving project file
\"
"
<<
m_project
.
string
()
<<
"
\"
."
;
// open the file for write
std
::
ofstream
output
(
m_project
.
file_
string
().
c_str
()
);
std
::
ofstream
output
(
m_project
.
string
().
c_str
()
);
if
(
!
output
.
is_open
()
)
{
throw
WFileOpenFailed
(
std
::
string
(
"The project file
\"
"
)
+
m_project
.
file_
string
()
+
throw
WFileOpenFailed
(
std
::
string
(
"The project file
\"
"
)
+
m_project
.
string
()
+
std
::
string
(
"
\"
could not be opened for write access."
)
);
}
...
...
@@ -114,13 +114,13 @@ void WProjectFile::save()
void
WProjectFile
::
threadMain
()
{
// Parse the file
wlog
::
info
(
"Project File"
)
<<
"Loading project file
\"
"
<<
m_project
.
file_
string
()
<<
"
\"
."
;
wlog
::
info
(
"Project File"
)
<<
"Loading project file
\"
"
<<
m_project
.
string
()
<<
"
\"
."
;
// read the file
std
::
ifstream
input
(
m_project
.
file_
string
().
c_str
()
);
std
::
ifstream
input
(
m_project
.
string
().
c_str
()
);
if
(
!
input
.
is_open
()
)
{
throw
WFileNotFound
(
std
::
string
(
"The project file
\"
"
)
+
m_project
.
file_
string
()
+
throw
WFileNotFound
(
std
::
string
(
"The project file
\"
"
)
+
m_project
.
string
()
+
std
::
string
(
"
\"
does not exist."
)
);
}
...
...
src/core/kernel/WProjectFile.h
View file @
e8991c64
...
...
@@ -28,10 +28,6 @@
#include <string>
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
...
...
src/modules/atlasCreator/WMAtlasCreator.cpp
View file @
e8991c64
...
...
@@ -25,10 +25,6 @@
#include <string>
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <osg/Image>
...
...
@@ -136,7 +132,7 @@ bool WMAtlasCreator::loadPngs( boost::filesystem::path sliceFile )
}
osg
::
Image
*
osgImage
;
osgImage
=
osgDB
::
readImageFile
(
sliceFile
.
file_
string
().
c_str
()
);
osgImage
=
osgDB
::
readImageFile
(
sliceFile
.
string
().
c_str
()
);
debugLog
()
<<
osgImage
->
r
()
<<
" : "
<<
osgImage
->
s
()
<<
" : "
<<
osgImage
->
t
();
...
...
@@ -146,14 +142,14 @@ bool WMAtlasCreator::loadPngs( boost::filesystem::path sliceFile )
path
dirPath
(
sliceFile
);
dirPath
.
remove_filename
().
file_
string
();
dirPath
.
remove_filename
().
string
();
m_volume
.
resize
(
m_xDim
*
m_yDim
*
m_zDim
,
0
);
directory_iterator
end_itr
;
// default construction yields past-the-end
for
(
directory_iterator
itr
(
dirPath
);
itr
!=
end_itr
;
++
itr
)
{
//debugLog() << itr->path().
file_
string().c_str();
//debugLog() << itr->path().string().c_str();
path
p
(
itr
->
path
()
);
if
(
p
.
extension
()
==
".png"
)
...
...
@@ -174,7 +170,7 @@ void WMAtlasCreator::addPngToVolume( boost::filesystem::path image )
{
using
namespace
boost
::
filesystem
;
//NOLINT
std
::
string
fn
=
image
.
filename
();
std
::
string
fn
=
image
.
filename
()
.
string
()
;
fn
.
erase
(
fn
.
size
()
-
4
,
4
);
std
::
string
number
=
fn
.
substr
(
fn
.
size
()
-
3
);
fn
.
erase
(
fn
.
size
()
-
3
,
3
);
...
...
@@ -204,7 +200,7 @@ void WMAtlasCreator::addPngToVolume( boost::filesystem::path image )
}
osg
::
Image
*
osgImage
;
osgImage
=
osgDB
::
readImageFile
(
image
.
file_
string
().
c_str
()
);
osgImage
=
osgDB
::
readImageFile
(
image
.
string
().
c_str
()
);
unsigned
char
*
data
=
osgImage
->
data
();
pos
/=
2
;
...
...
src/modules/clusterDisplay/WMClusterDisplay.cpp
View file @
e8991c64
...
...
@@ -405,7 +405,7 @@ void WMClusterDisplay::moduleMain()
if
(
m_readTriggerProp
->
get
(
true
)
==
WPVBaseTypes
::
PV_TRIGGER_TRIGGERED
)
{
std
::
string
fileName
=
m_propTreeFile
->
get
().
file_
string
().
c_str
();
std
::
string
fileName
=
m_propTreeFile
->
get
().
string
().
c_str
();
treeLoaded
=
loadTreeAscii
(
fileName
);
m_readTriggerProp
->
set
(
WPVBaseTypes
::
PV_TRIGGER_READY
,
true
);
if
(
treeLoaded
)
...
...
src/modules/clusterDisplayVoxels/WFileParser.cpp
View file @
e8991c64
...
...
@@ -26,10 +26,6 @@
#include <string>
#include <vector>
// Use filesystem version 2 for compatibility with newer boost versions.
#ifndef BOOST_FILESYSTEM_VERSION
#define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/regex.hpp>
...
...
src/modules/coordinateSystem/WRulerOrtho.cpp
View file @
e8991c64
...
...
@@ -106,7 +106,7 @@ void WRulerOrtho::addLabel( osg::Vec3 position, std::string text )
labelGeode
->
addDrawable
(
label
);
// setup font
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
file_
string
()
);
label
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
string
()
);
label
->
setBackdropType
(
osgText
::
Text
::
OUTLINE
);
label
->
setCharacterSize
(
6
);
...
...
src/modules/data/WMWriteNIfTI.cpp
View file @
e8991c64
...
...
@@ -167,7 +167,7 @@ void WMWriteNIfTI::writeToFile()
{
m_saveTriggerProp
->
set
(
WPVBaseTypes
::
PV_TRIGGER_READY
,
false
);
infoLog
()
<<
"Writing Data to "
<<
m_filename
->
get
().
file_
string
();
infoLog
()
<<
"Writing Data to "
<<
m_filename
->
get
().
string
();
nifti_image
*
outField
=
nifti_simple_init_nim
();
boost
::
shared_ptr
<
WGridRegular3D
>
grid
=
boost
::
shared_dynamic_cast
<
WGridRegular3D
>
(
m_dataSet
->
getGrid
()
);
...
...
@@ -281,7 +281,7 @@ void WMWriteNIfTI::writeToFile()
}
outField
->
data
=
data
;
std
::
string
s
=
m_filename
->
get
().
file_
string
();
std
::
string
s
=
m_filename
->
get
().
string
();
if
(
nifti_set_filenames
(
outField
,
s
.
c_str
(),
0
,
1
)
)
{
throw
WException
(
std
::
string
(
"NIfTI filename Problem"
)
);
...
...
src/modules/fiberTranslator/WMFiberTranslator.cpp
View file @
e8991c64
...
...
@@ -140,7 +140,7 @@ boost::shared_ptr< WDataSetFibers > WMFiberTranslator::mergeFibers( boost::files
if
(
!
boost
::
filesystem
::
exists
(
dir
)
||
!
boost
::
filesystem
::
is_directory
(
dir
)
)
{
errorLog
()
<<
"Directory "
<<
dir
.
file_
string
()
<<
" does not exist!"
;
errorLog
()
<<
"Directory "
<<
dir
.
string
()
<<
" does not exist!"
;
return
boost
::
shared_ptr
<
WDataSetFibers
>
();
}
...
...
@@ -158,7 +158,7 @@ boost::shared_ptr< WDataSetFibers > WMFiberTranslator::mergeFibers( boost::files
continue
;
}
std
::
fstream
f
(
it
->
path
().
file_
string
().
c_str
(),
std
::
ios
::
in
);
std
::
fstream
f
(
it
->
path
().
string
().
c_str
(),
std
::
ios
::
in
);
WVector3d
v
;
while
(
f
>>
v
[
0
]
>>
v
[
1
]
>>
v
[
2
]
)
...
...
@@ -184,7 +184,7 @@ boost::shared_ptr< WDataSetFibers > WMFiberTranslator::mergeFibersNrrd( boost::f
if
(
!
boost
::
filesystem
::
exists
(
dir
)
||
!
boost
::
filesystem
::
is_directory
(
dir
)
)
{
errorLog
()
<<
"Directory "
<<
dir
.
file_
string
()
<<
" does not exist!"
;
errorLog
()
<<
"Directory "
<<
dir
.
string
()
<<
" does not exist!"
;
return
boost
::
shared_ptr
<
WDataSetFibers
>
();
}
...
...
@@ -202,7 +202,7 @@ boost::shared_ptr< WDataSetFibers > WMFiberTranslator::mergeFibersNrrd( boost::f
continue
;
}
std
::
fstream
f
(
it
->
path
().
file_
string
().
c_str
(),
std
::
ios
::
in
|
std
::
ios
::
binary
);
std
::
fstream
f
(
it
->
path
().
string
().
c_str
(),
std
::
ios
::
in
|
std
::
ios
::
binary
);
WVector3d
v
;
while
(
f
>>
v
[
0
]
>>
v
[
1
]
>>
v
[
2
]
)
...
...
@@ -230,26 +230,26 @@ boost::shared_ptr< WDataSetFibers > WMFiberTranslator::loadExploreDTIFibers( boo
if
(
!
boost
::
filesystem
::
exists
(
file
)
||
boost
::
filesystem
::
is_directory
(
file
)
)
{
errorLog
()
<<
"File "
<<
file
.
file_
string
()
<<
" does not exist!"
;
errorLog
()
<<
"File "
<<
file
.
string
()
<<
" does not exist!"
;
return
boost
::
shared_ptr
<
WDataSetFibers
>
();
}
// the file should end in "_coordinates.txt"
if
(
file
.
file_string
().
length
()
<
16
||
file
.
file_string
().
find
(
"_coordinates.txt"
)
!=
file
.
file_
string
().
length
()
-
16
)
if
(
file
.
string
().
length
()
<
16
||
file
.
string
().
find
(
"_coordinates.txt"
)
!=
file
.
string
().
length
()
-
16
)
{
errorLog
()
<<
"File "
<<
file
<<
" does not end in _coordinates.txt. Ignoring."
;
return
boost
::
shared_ptr
<
WDataSetFibers
>
();
}
// get the name of the corresponding fiber length file
std
::
string
lengthFile
=
file
.
file_
string
();
std
::
string
lengthFile
=
file
.
string
();
lengthFile
.
resize
(
lengthFile
.
length
()
-
16
);
lengthFile
+=
"_lengths.txt"
;
WFiberAccumulator
accu
;
// open files
std
::
fstream
coords
(
file
.
file_
string
().
c_str
(),
std
::
ios
::
in
);
std
::
fstream
coords
(
file
.
string
().
c_str
(),
std
::
ios
::
in
);
std
::
fstream
lengths
(
lengthFile
.
c_str
(),
std
::
ios
::
in
);
while
(
!
lengths
.
eof
()
&&
!
lengths
.
bad
()
)
...
...
src/modules/histogramView/WMHistogramView.cpp
View file @
e8991c64
...
...
@@ -1061,7 +1061,7 @@ void WMHistogramView::createFrame()
osgText
::
Text
*
text
=
new
osgText
::
Text
;
WVector2d
textPos
=
histogramSpaceToWindowSpace
(
WVector2d
(
i
,
0.0
)
)
-
offsetY
*
1.2
;
text
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
file_
string
()
);
text
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
string
()
);
text
->
setColor
(
frameColor
);
text
->
setCharacterSize
(
12
);
text
->
setAlignment
(
osgText
::
TextBase
::
CENTER_TOP
);
...
...
@@ -1083,7 +1083,7 @@ void WMHistogramView::createFrame()
osgText
::
Text
*
text
=
new
osgText
::
Text
;
WVector2d
textPos
=
histogramSpaceToWindowSpace
(
WVector2d
(
m_frameLowerLeft
[
0
],
i
)
)
-
offsetX
*
1.2
;
text
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
file_
string
()
);
text
->
setFont
(
WPathHelper
::
getAllFonts
().
Default
.
string
()
);
text
->
setColor
(
frameColor
);
text
->
setCharacterSize
(
12
);
text
->
setAlignment
(
osgText
::
TextBase
::
RIGHT_CENTER
);
...
...
@@ -1166,7 +1166,7 @@ void WMHistogramView::createInfo()
osgText
::
Text
*
text
=
new
osgText
::
Text
;