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
189eca71
Commit
189eca71
authored
Apr 03, 2012
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[STYLE
#147
] renamed all API functions to filename (small written n).
parent
9a234999
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
193 additions
and
115 deletions
+193
-115
src/core/common/WIOTools.cpp
src/core/common/WIOTools.cpp
+6
-1
src/core/common/WIOTools.h
src/core/common/WIOTools.h
+10
-2
src/core/common/test/WIOTools_test.h
src/core/common/test/WIOTools_test.h
+1
-1
src/core/dataHandler/WDataSet.cpp
src/core/dataHandler/WDataSet.cpp
+15
-5
src/core/dataHandler/WDataSet.h
src/core/dataHandler/WDataSet.h
+23
-5
src/core/dataHandler/WDataSetFiberVector.cpp
src/core/dataHandler/WDataSetFiberVector.cpp
+2
-2
src/core/dataHandler/WDataSetTimeSeries.cpp
src/core/dataHandler/WDataSetTimeSeries.cpp
+1
-1
src/core/dataHandler/WEEG2.cpp
src/core/dataHandler/WEEG2.cpp
+1
-1
src/core/dataHandler/io/WPagerEEG.cpp
src/core/dataHandler/io/WPagerEEG.cpp
+10
-5
src/core/dataHandler/io/WPagerEEG.h
src/core/dataHandler/io/WPagerEEG.h
+13
-8
src/core/dataHandler/io/WReader.cpp
src/core/dataHandler/io/WReader.cpp
+6
-1
src/core/dataHandler/io/WReader.h
src/core/dataHandler/io/WReader.h
+12
-3
src/core/dataHandler/io/WWriter.cpp
src/core/dataHandler/io/WWriter.cpp
+6
-1
src/core/dataHandler/io/WWriter.h
src/core/dataHandler/io/WWriter.h
+11
-3
src/core/dataHandler/test/WSubject_test.h
src/core/dataHandler/test/WSubject_test.h
+5
-5
src/core/kernel/WBatchLoader.cpp
src/core/kernel/WBatchLoader.cpp
+3
-3
src/core/kernel/WBatchLoader.h
src/core/kernel/WBatchLoader.h
+3
-3
src/core/kernel/WKernel.cpp
src/core/kernel/WKernel.cpp
+4
-4
src/core/kernel/WKernel.h
src/core/kernel/WKernel.h
+4
-4
src/core/kernel/WModuleContainer.cpp
src/core/kernel/WModuleContainer.cpp
+4
-4
src/core/kernel/WModuleContainer.h
src/core/kernel/WModuleContainer.h
+4
-4
src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
+1
-1
src/modules/bermanTracking/WMBermanTracking.cpp
src/modules/bermanTracking/WMBermanTracking.cpp
+1
-1
src/modules/clusterDisplay/WMClusterDisplay.cpp
src/modules/clusterDisplay/WMClusterDisplay.cpp
+1
-1
src/modules/data/io/WPagerEEGLibeep.cpp
src/modules/data/io/WPagerEEGLibeep.cpp
+12
-12
src/modules/data/io/WReaderBiosig.cpp
src/modules/data/io/WReaderBiosig.cpp
+1
-1
src/modules/data/io/WReaderEEGASCII.cpp
src/modules/data/io/WReaderEEGASCII.cpp
+1
-1
src/modules/data/io/WReaderFiberVTK.cpp
src/modules/data/io/WReaderFiberVTK.cpp
+1
-1
src/modules/data/io/WReaderLibeep.cpp
src/modules/data/io/WReaderLibeep.cpp
+1
-1
src/modules/data/io/WReaderNIfTI.cpp
src/modules/data/io/WReaderNIfTI.cpp
+1
-1
src/modules/data/io/WReaderVTK.cpp
src/modules/data/io/WReaderVTK.cpp
+1
-1
src/modules/detTractClustering/WMDetTractClustering.cpp
src/modules/detTractClustering/WMDetTractClustering.cpp
+1
-1
src/modules/eegView/WMEEGView.cpp
src/modules/eegView/WMEEGView.cpp
+1
-1
src/modules/fiberTransform/WMFiberTransform.cpp
src/modules/fiberTransform/WMFiberTransform.cpp
+1
-1
src/modules/functionalMRIViewer/WMFunctionalMRIViewer.cpp
src/modules/functionalMRIViewer/WMFunctionalMRIViewer.cpp
+1
-1
src/modules/imageExtractor/WMImageExtractor.cpp
src/modules/imageExtractor/WMImageExtractor.cpp
+2
-2
src/modules/openIGTLink/WIGTLinkRemote.cpp
src/modules/openIGTLink/WIGTLinkRemote.cpp
+4
-4
src/modules/schmahmannPandyaSlices/probTractDisplaySP/WMProbTractDisplaySP.cpp
...nPandyaSlices/probTractDisplaySP/WMProbTractDisplaySP.cpp
+2
-2
src/modules/schmahmannPandyaSlices/probTractDisplaySP/WSPSliceBuilder.cpp
...ahmannPandyaSlices/probTractDisplaySP/WSPSliceBuilder.cpp
+1
-1
src/modules/template/WMTemplate.cpp
src/modules/template/WMTemplate.cpp
+1
-1
src/modules/writeMesh/test/WMWriteMesh_test.h
src/modules/writeMesh/test/WMWriteMesh_test.h
+2
-2
src/qt4gui/qt4/WMainWindow.cpp
src/qt4gui/qt4/WMainWindow.cpp
+12
-12
No files found.
src/core/common/WIOTools.cpp
View file @
189eca71
...
...
@@ -76,11 +76,16 @@ void writeStringIntoFile( const boost::filesystem::path& path, const std::string
}
boost
::
filesystem
::
path
tempFileName
()
{
return
tempFilename
();
}
boost
::
filesystem
::
path
tempFilename
()
{
// REGARDING THE COMPILER WARNING
// 1. mkstemp is only available for POSIX systems
// 2. reason: the warning generated here is due to a race condition
// while tmpnam invents the file
N
ame it may be created by another process
// while tmpnam invents the file
n
ame it may be created by another process
// 3. file names like "/tmp/pansen" or "C:\pansen" are platform dependent
return
boost
::
filesystem
::
path
(
std
::
string
(
std
::
tmpnam
(
NULL
)
)
);
}
...
...
src/core/common/WIOTools.h
View file @
189eca71
...
...
@@ -32,7 +32,7 @@
#include <boost/filesystem.hpp>
#include "WDefines.h"
#include "WAssert.h"
/**
...
...
@@ -118,9 +118,17 @@ inline bool fileExists( const std::string& name )
/**
* Generate a file name with full path for a temp file.
* \deprecated use tempFilename instead
* \return The file name.
*/
OW_API_DEPRECATED
boost
::
filesystem
::
path
tempFileName
();
/**
* Generate a file name with full path for a temp file.
*
* \return The file name.
*/
boost
::
filesystem
::
path
tempFile
N
ame
();
boost
::
filesystem
::
path
tempFile
n
ame
();
/**
* Get the contens of a file as a string.
...
...
src/core/common/test/WIOTools_test.h
View file @
189eca71
...
...
@@ -102,7 +102,7 @@ public:
void
testWriteStringIntoFile
(
void
)
{
std
::
string
content
=
"Hello Pansen!
\r\n
"
;
boost
::
filesystem
::
path
fpath
=
tempFile
N
ame
();
boost
::
filesystem
::
path
fpath
=
tempFile
n
ame
();
writeStringIntoFile
(
fpath
,
content
);
std
::
ifstream
input
(
fpath
.
string
().
c_str
()
);
...
...
src/core/dataHandler/WDataSet.cpp
View file @
189eca71
...
...
@@ -39,20 +39,30 @@ WDataSet::WDataSet()
:
WTransferable
(),
m_properties
(
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"Data-Set Properties"
,
"Properties of a data-set"
)
)
),
m_infoProperties
(
boost
::
shared_ptr
<
WProperties
>
(
new
WProperties
(
"Data-Set Info Properties"
,
"Data-set's information properties"
)
)
),
m_file
N
ame
(
""
)
m_file
n
ame
(
""
)
{
m_infoProperties
->
setPurpose
(
PV_PURPOSE_INFORMATION
);
}
void
WDataSet
::
setFileName
(
const
std
::
string
file
N
ame
)
void
WDataSet
::
setFileName
(
const
std
::
string
file
n
ame
)
{
WAssert
(
fileName
!=
""
,
"No filename set for data set."
);
m_fileName
=
fileName
;
setFilename
(
filename
);
}
std
::
string
WDataSet
::
getFileName
()
const
{
return
m_fileName
;
return
getFilename
();
}
void
WDataSet
::
setFilename
(
const
std
::
string
filename
)
{
WAssert
(
filename
!=
""
,
"No filename set for data set."
);
m_filename
=
filename
;
}
std
::
string
WDataSet
::
getFilename
()
const
{
return
m_filename
;
}
bool
WDataSet
::
isTexture
()
const
...
...
src/core/dataHandler/WDataSet.h
View file @
189eca71
...
...
@@ -53,7 +53,7 @@ class WDataSet: public WTransferable, public boost::enable_shared_from_this< WDa
public:
/**
* This constructor should be used if a dataSet does not stem from a file.
* It presets the its correpsonding file
N
ame as empty string.
* It presets the its correpsonding file
n
ame as empty string.
*/
WDataSet
();
...
...
@@ -67,16 +67,34 @@ public:
/**
* Set the name of the file that this data set stems from.
* \param fileName the string representing the name
*
* \param filename the string representing the name
*/
void
setFilename
(
const
std
::
string
filename
);
/**
* Get the name of the file that this data set stems from.
*
* \return the filename.
*/
std
::
string
getFilename
()
const
;
/**
* Set the name of the file that this data set stems from.
*
* \param filename the string representing the name
*
* \deprecated use setFilename instead
*/
void
setFileName
(
const
std
::
string
fileN
ame
);
OW_API_DEPRECATED
void
setFileName
(
const
std
::
string
filen
ame
);
/**
* Get the name of the file that this data set stems from.
*
* \deprecated use getFilename instead
* \return the filename.
*/
std
::
string
getFileName
()
const
;
OW_API_DEPRECATED
std
::
string
getFileName
()
const
;
/**
* Determines whether this dataset can be used as a texture.
...
...
@@ -160,7 +178,7 @@ private:
* may allow hollowing data sets later. DataSets that were not loaded
* from a file should have the empty string stored here.
*/
std
::
string
m_file
N
ame
;
std
::
string
m_file
n
ame
;
};
#endif // WDATASET_H
...
...
src/core/dataHandler/WDataSetFiberVector.cpp
View file @
189eca71
...
...
@@ -56,9 +56,9 @@ WDataSetFiberVector::WDataSetFiberVector( boost::shared_ptr< const WDataSetFiber
return
;
}
if
(
fiberDS
->
getFile
N
ame
()
!=
""
)
if
(
fiberDS
->
getFile
n
ame
()
!=
""
)
{
setFile
Name
(
fiberDS
->
getFileN
ame
()
);
setFile
name
(
fiberDS
->
getFilen
ame
()
);
}
size_t
numLines
=
fiberDS
->
size
();
const
std
::
vector
<
size_t
>&
lineLengths
=
*
fiberDS
->
getLineLengths
();
...
...
src/core/dataHandler/WDataSetTimeSeries.cpp
View file @
189eca71
...
...
@@ -180,7 +180,7 @@ boost::shared_ptr< WDataSetScalar const > WDataSetTimeSeries::calcDataSetAtTime(
break
;
}
boost
::
shared_ptr
<
WDataSetScalar
>
ds
(
new
WDataSetScalar
(
vs
,
m_dataSets
.
front
().
first
->
getGrid
()
)
);
ds
->
setFile
N
ame
(
name
);
ds
->
setFile
n
ame
(
name
);
return
ds
;
}
...
...
src/core/dataHandler/WEEG2.cpp
View file @
189eca71
...
...
@@ -71,7 +71,7 @@ WEEG2::WEEG2( boost::shared_ptr< WPagerEEG > pager, boost::shared_ptr< WEEGPosit
throw
WDHException
(
std
::
string
(
"Couldn't construct new EEG: invalid sampling rate"
)
);
}
setFile
Name
(
pager
->
getFileN
ame
()
);
setFile
name
(
pager
->
getFilen
ame
()
);
m_segments
.
reserve
(
nbSegments
);
for
(
std
::
size_t
segmentID
=
0
;
segmentID
<
nbSegments
;
++
segmentID
)
...
...
src/core/dataHandler/io/WPagerEEG.cpp
View file @
189eca71
...
...
@@ -35,14 +35,19 @@ WPagerEEG::~WPagerEEG()
std
::
string
WPagerEEG
::
getFileName
()
const
{
return
m_fileName
;
return
getFilename
()
;
}
WPagerEEG
::
WPagerEEG
(
std
::
string
fileName
)
:
m_fileName
(
fileName
)
std
::
string
WPagerEEG
::
getFilename
()
const
{
if
(
!
fileExists
(
m_fileName
)
)
return
m_filename
;
}
WPagerEEG
::
WPagerEEG
(
std
::
string
filename
)
:
m_filename
(
filename
)
{
if
(
!
fileExists
(
m_filename
)
)
{
throw
WDHNoSuchFile
(
m_file
N
ame
+
" doesn't exist"
);
throw
WDHNoSuchFile
(
m_file
n
ame
+
" doesn't exist"
);
}
}
src/core/dataHandler/io/WPagerEEG.h
View file @
189eca71
...
...
@@ -32,8 +32,7 @@
#include <boost/shared_ptr.hpp>
#include "../WEEGValueMatrix.h"
#include "../../common/WDefines.h"
/**
* Abstract class to load an EEG file and keep it open to support paging.
...
...
@@ -52,7 +51,15 @@ public:
*
* \return name of file
*/
std
::
string
getFileName
()
const
;
std
::
string
getFilename
()
const
;
/**
* Get the name of the loaded file.
*
* \return name of file
* \deprecated use getFilename instead
*/
OW_API_DEPRECATED
std
::
string
getFileName
()
const
;
/**
* Get the number of segments this EEG consists of.
...
...
@@ -113,13 +120,11 @@ protected:
/**
* Constructor
*
* \param file
N
ame path and filename to the file to load
* \param file
n
ame path and filename to the file to load
*/
explicit
WPagerEEG
(
std
::
string
fileName
);
std
::
string
m_fileName
;
//!< name of the loaded file
explicit
WPagerEEG
(
std
::
string
filename
);
private:
std
::
string
m_filename
;
//!< name of the loaded file
};
#endif // WPAGEREEG_H
src/core/dataHandler/io/WReader.cpp
View file @
189eca71
...
...
@@ -30,10 +30,15 @@
WReader
::
WReader
(
std
::
string
fname
)
throw
(
WDHNoSuchFile
)
{
setFile
N
ame
(
fname
);
// not in constructor list since fileExcsits check
setFile
n
ame
(
fname
);
// not in constructor list since fileExcsits check
}
void
WReader
::
setFileName
(
std
::
string
fname
)
throw
(
WDHNoSuchFile
)
{
setFilename
(
fname
);
}
void
WReader
::
setFilename
(
std
::
string
fname
)
throw
(
WDHNoSuchFile
)
{
m_fname
=
fname
;
if
(
!
fileExists
(
m_fname
)
)
...
...
src/core/dataHandler/io/WReader.h
View file @
189eca71
...
...
@@ -28,7 +28,7 @@
#include <string>
#include "../exceptions/WDHNoSuchFile.h"
#include "../../common/WDefines.h"
/**
* Read some data from a given file. This base class is just for file
...
...
@@ -36,7 +36,7 @@
* specify their file format which is not the purpose of this base class.
* \ingroup dataHandler
*/
class
WReader
// NOLINT
class
WReader
{
public:
/**
...
...
@@ -47,13 +47,22 @@ public:
*/
explicit
WReader
(
std
::
string
fname
)
throw
(
WDHNoSuchFile
);
/**
* Reset the file name and checks if it exists.
*
* \param fname file name
* \throws WDHNoSuchFile
* \deprecated use setFilename instead.
*/
OW_API_DEPRECATED
void
setFileName
(
std
::
string
fname
)
throw
(
WDHNoSuchFile
);
/**
* Reset the file name and checks if it exists.
*
* \param fname file name
* \throws WDHNoSuchFile
*/
void
setFile
N
ame
(
std
::
string
fname
)
throw
(
WDHNoSuchFile
);
void
setFile
n
ame
(
std
::
string
fname
)
throw
(
WDHNoSuchFile
);
protected:
std
::
string
m_fname
;
//!< Absolute path of the file to read from
...
...
src/core/dataHandler/io/WWriter.cpp
View file @
189eca71
...
...
@@ -33,10 +33,15 @@
WWriter
::
WWriter
(
std
::
string
fname
,
bool
overwrite
)
:
m_overwrite
(
overwrite
)
{
setFile
N
ame
(
fname
);
// not in constructor list since fileExcsits check
setFile
n
ame
(
fname
);
// not in constructor list since fileExcsits check
}
void
WWriter
::
setFileName
(
std
::
string
fname
)
{
setFilename
(
fname
);
}
void
WWriter
::
setFilename
(
std
::
string
fname
)
{
m_fname
=
fname
;
if
(
!
m_overwrite
&&
boost
::
filesystem
::
exists
(
boost
::
filesystem
::
path
(
m_fname
)
)
)
...
...
src/core/dataHandler/io/WWriter.h
View file @
189eca71
...
...
@@ -27,7 +27,7 @@
#include <string>
#include "../../common/WDefines.h"
/**
* Write some data to the given file. This base class is just for file
...
...
@@ -51,13 +51,21 @@ public:
* non overwriting is specified.
*
* \param fname file name
* \deprecated use setFilename instead
*/
void
setFileName
(
std
::
string
fname
);
OW_API_DEPRECATED
void
setFileName
(
std
::
string
fname
);
/**
* Reset file name and checks if the file already exists in case of
* non overwriting is specified.
*
* \param fname file name
*/
void
setFilename
(
std
::
string
fname
);
protected:
std
::
string
m_fname
;
//!< Absolute path of the file to write to
bool
m_overwrite
;
//!< flag indicating if the file may be overwritten (true) or not (false)
private:
};
...
...
src/core/dataHandler/test/WSubject_test.h
View file @
189eca71
...
...
@@ -84,8 +84,8 @@ public:
{
boost
::
shared_ptr
<
WDataSet
>
dummyDataSet
;
dummyDataSet
=
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSet
);
std
::
string
file
N
ame
=
"Hallo"
;
dummyDataSet
->
setFile
Name
(
fileN
ame
);
std
::
string
file
n
ame
=
"Hallo"
;
dummyDataSet
->
setFile
name
(
filen
ame
);
WSubject
dummySubject
;
dummySubject
.
addDataSet
(
dummyDataSet
);
...
...
@@ -97,7 +97,7 @@ public:
for
(
WSubject
::
DatasetConstIterator
iter
=
a
->
get
().
begin
();
iter
!=
a
->
get
().
end
();
++
iter
)
{
count
++
;
TS_ASSERT_EQUALS
(
file
Name
,
(
*
iter
)
->
getFileN
ame
()
);
TS_ASSERT_EQUALS
(
file
name
,
(
*
iter
)
->
getFilen
ame
()
);
TS_ASSERT_EQUALS
(
dummyDataSet
,
(
*
iter
)
);
}
...
...
@@ -111,8 +111,8 @@ public:
{
boost
::
shared_ptr
<
WDataSet
>
dummyDataSet
;
dummyDataSet
=
boost
::
shared_ptr
<
WDataSet
>
(
new
WDataSet
);
std
::
string
file
N
ame
=
"Hallo"
;
dummyDataSet
->
setFile
Name
(
fileN
ame
);
std
::
string
file
n
ame
=
"Hallo"
;
dummyDataSet
->
setFile
name
(
filen
ame
);
WSubject
dummySubject
;
TS_ASSERT_EQUALS
(
0
,
dummySubject
.
m_datasets
.
size
()
);
...
...
src/core/kernel/WBatchLoader.cpp
View file @
189eca71
...
...
@@ -31,10 +31,10 @@
#include "WBatchLoader.h"
WBatchLoader
::
WBatchLoader
(
std
::
vector
<
std
::
string
>
file
N
ames
,
boost
::
shared_ptr
<
WModuleContainer
>
targetContainer
)
:
WBatchLoader
::
WBatchLoader
(
std
::
vector
<
std
::
string
>
file
n
ames
,
boost
::
shared_ptr
<
WModuleContainer
>
targetContainer
)
:
WThreadedRunner
(),
boost
::
enable_shared_from_this
<
WBatchLoader
>
(),
m_file
NamesToLoad
(
fileN
ames
),
m_file
namesToLoad
(
filen
ames
),
m_targetContainer
(
targetContainer
),
m_suppressColormaps
(
false
)
{
...
...
@@ -58,7 +58,7 @@ void WBatchLoader::run()
void
WBatchLoader
::
threadMain
()
{
// add a new data module for each file to load
for
(
std
::
vector
<
std
::
string
>::
iterator
iter
=
m_file
NamesToLoad
.
begin
();
iter
!=
m_fileN
amesToLoad
.
end
();
++
iter
)
for
(
std
::
vector
<
std
::
string
>::
iterator
iter
=
m_file
namesToLoad
.
begin
();
iter
!=
m_filen
amesToLoad
.
end
();
++
iter
)
{
boost
::
shared_ptr
<
WModule
>
mod
=
WModuleFactory
::
getModuleFactory
()
->
create
(
WModuleFactory
::
getModuleFactory
()
->
getPrototypeByName
(
"Data Module"
)
...
...
src/core/kernel/WBatchLoader.h
View file @
189eca71
...
...
@@ -65,10 +65,10 @@ public:
/**
* Initializes the batchloader but does not start it. Use run().
*
* \param file
N
ames the files to load.
* \param file
n
ames the files to load.
* \param targetContainer the container to which the data modules should be added.
*/
WBatchLoader
(
std
::
vector
<
std
::
string
>
file
N
ames
,
boost
::
shared_ptr
<
WModuleContainer
>
targetContainer
);
WBatchLoader
(
std
::
vector
<
std
::
string
>
file
n
ames
,
boost
::
shared_ptr
<
WModuleContainer
>
targetContainer
);
/**
* Destructor.
...
...
@@ -114,7 +114,7 @@ protected:
/**
* List of files to load.
*/
std
::
vector
<
std
::
string
>
m_file
N
amesToLoad
;
std
::
vector
<
std
::
string
>
m_file
n
amesToLoad
;
/**
* The container which later will contain the loaded datasets.
...
...
src/core/kernel/WKernel.cpp
View file @
189eca71
...
...
@@ -160,14 +160,14 @@ const WBoolFlag& WKernel::isFinishRequested() const
return
m_shutdownFlag
;
}
WBatchLoader
::
SPtr
WKernel
::
loadDataSets
(
std
::
vector
<
std
::
string
>
file
N
ames
,
bool
suppressColormaps
)
WBatchLoader
::
SPtr
WKernel
::
loadDataSets
(
std
::
vector
<
std
::
string
>
file
n
ames
,
bool
suppressColormaps
)
{
return
getRootContainer
()
->
loadDataSets
(
file
N
ames
,
suppressColormaps
);
return
getRootContainer
()
->
loadDataSets
(
file
n
ames
,
suppressColormaps
);
}
WBatchLoader
::
SPtr
WKernel
::
loadDataSetsSynchronously
(
std
::
vector
<
std
::
string
>
file
N
ames
,
bool
suppressColormaps
)
WBatchLoader
::
SPtr
WKernel
::
loadDataSetsSynchronously
(
std
::
vector
<
std
::
string
>
file
n
ames
,
bool
suppressColormaps
)
{
return
getRootContainer
()
->
loadDataSetsSynchronously
(
file
N
ames
,
suppressColormaps
);
return
getRootContainer
()
->
loadDataSetsSynchronously
(
file
n
ames
,
suppressColormaps
);
}
boost
::
shared_ptr
<
WModule
>
WKernel
::
applyModule
(
boost
::
shared_ptr
<
WModule
>
applyOn
,
boost
::
shared_ptr
<
WModule
>
prototype
)
...
...
src/core/kernel/WKernel.h
View file @
189eca71
...
...
@@ -109,26 +109,26 @@ public:
/**
* Load specified datasets. It immediately returns and starts another thread, which actually loads the data.
*
* \param file
N
ames list of filenames to load. The registered notification handler for the root container will get notified on
* \param file
n
ames list of filenames to load. The registered notification handler for the root container will get notified on
* error and success.
* \param suppressColormaps if true, the data modules are instructed to avoid registration of colormaps. This can be very handy if you
* combine multiple data loaders into one new data loader or data set
*
* \return the batch loader responsible for loading. Can be queried for the list of data modules.
*/
WBatchLoader
::
SPtr
loadDataSets
(
std
::
vector
<
std
::
string
>
file
N
ames
,
bool
suppressColormaps
=
false
);
WBatchLoader
::
SPtr
loadDataSets
(
std
::
vector
<
std
::
string
>
file
n
ames
,
bool
suppressColormaps
=
false
);
/**
* Loads the specified files synchronously.
*
* \param file
N
ames list of filenames to load. The registered notification handler for the root container will get notified on
* \param file
n
ames list of filenames to load. The registered notification handler for the root container will get notified on
* error and success.
* \param suppressColormaps if true, the data modules are instructed to avoid registration of colormaps. This can be very handy if you
* combine multiple data loaders into one new data loader or data set
*
* \return the batch loader responsible for loading. Can be queried for the list of data modules.
*/
WBatchLoader
::
SPtr
loadDataSetsSynchronously
(
std
::
vector
<
std
::
string
>
file
N
ames
,
bool
suppressColormaps
=
false
);
WBatchLoader
::
SPtr
loadDataSetsSynchronously
(
std
::
vector
<
std
::
string
>
file
n
ames
,
bool
suppressColormaps
=
false
);
/**
* Function combines to modules. This is a simple alias for "getRootContainer()->applyModule". It runs synchronously, which
...
...
src/core/kernel/WModuleContainer.cpp
View file @
189eca71
...
...
@@ -436,10 +436,10 @@ boost::shared_ptr< WModule > WModuleContainer::applyModule( boost::shared_ptr< W
return
m
;
}
WBatchLoader
::
SPtr
WModuleContainer
::
loadDataSets
(
std
::
vector
<
std
::
string
>
file
N
ames
,
bool
suppressColormaps
)
WBatchLoader
::
SPtr
WModuleContainer
::
loadDataSets
(
std
::
vector
<
std
::
string
>
file
n
ames
,
bool
suppressColormaps
)
{
// create thread which actually loads the data
boost
::
shared_ptr
<
WBatchLoader
>
t
=
boost
::
shared_ptr
<
WBatchLoader
>
(
new
WBatchLoader
(
file
N
ames
,
boost
::
shared_ptr
<
WBatchLoader
>
t
=
boost
::
shared_ptr
<
WBatchLoader
>
(
new
WBatchLoader
(
file
n
ames
,
boost
::
shared_static_cast
<
WModuleContainer
>
(
shared_from_this
()
)
)
);
t
->
setSuppressColormaps
(
suppressColormaps
);
...
...
@@ -447,10 +447,10 @@ WBatchLoader::SPtr WModuleContainer::loadDataSets( std::vector< std::string > fi
return
t
;
}
WBatchLoader
::
SPtr
WModuleContainer
::
loadDataSetsSynchronously
(
std
::
vector
<
std
::
string
>
file
N
ames
,
bool
suppressColormaps
)
WBatchLoader
::
SPtr
WModuleContainer
::
loadDataSetsSynchronously
(
std
::
vector
<
std
::
string
>
file
n
ames
,
bool
suppressColormaps
)
{
// create thread which actually loads the data
boost
::
shared_ptr
<
WBatchLoader
>
t
=
boost
::
shared_ptr
<
WBatchLoader
>
(
new
WBatchLoader
(
file
N
ames
,
boost
::
shared_ptr
<
WBatchLoader
>
t
=
boost
::
shared_ptr
<
WBatchLoader
>
(
new
WBatchLoader
(
file
n
ames
,
boost
::
shared_static_cast
<
WModuleContainer
>
(
shared_from_this
()
)
)
);
t
->
setSuppressColormaps
(
suppressColormaps
);
...
...
src/core/kernel/WModuleContainer.h
View file @
189eca71
...
...
@@ -202,26 +202,26 @@ public:
/**
* Load specified datasets. It immediately returns and starts another thread, which actually loads the data.
*
* \param file
N
ames list of filenames to load. The registered notification handler for the root container will get notified on
* \param file
n
ames list of filenames to load. The registered notification handler for the root container will get notified on
* error and success.
* \param suppressColormaps if true, the data modules are instructed to avoid registration of colormaps. This can be very handy if you
* combine multiple data loaders into one new data loader or data set
*
* \return the loader handling the load operation
*/
WBatchLoader
::
SPtr
loadDataSets
(
std
::
vector
<
std
::
string
>
file
N
ames
,
bool
suppressColormaps
=
false
);
WBatchLoader
::
SPtr
loadDataSets
(
std
::
vector
<
std
::
string
>
file
n
ames
,
bool
suppressColormaps
=
false
);
/**
* Loads the specified files synchronously. The returned batchloader can be queried for the list of data modules that have been added.
*
* \param file
N
ames list of filenames to load. The registered notification handler for the root container will get notified on
* \param file
n
ames list of filenames to load. The registered notification handler for the root container will get notified on
* error and success.
* \param suppressColormaps if true, the data modules are instructed to avoid registration of colormaps. This can be very handy if you
* combine multiple data loaders into one new data loader or data set
*
* \return the loader has handled the load operation
*/
WBatchLoader
::
SPtr
loadDataSetsSynchronously
(
std
::
vector
<
std
::
string
>
file
N
ames
,
bool
suppressColormaps
=
false
);
WBatchLoader
::
SPtr
loadDataSetsSynchronously
(
std
::
vector
<
std
::
string
>
file
n
ames
,
bool
suppressColormaps
=
false
);
/**
* Add the specified thread to the list of pending jobs. Only this ensures, that ALL pending threads get stopped before the
...
...
src/modules/atlasSurfaces/WMAtlasSurfaces.cpp
View file @
189eca71
...
...
@@ -150,7 +150,7 @@ void WMAtlasSurfaces::moduleMain()
if
(
m_labelFile
->
get
(
true
)
==
boost
::
filesystem
::
path
(
""
)
)
{
std
::
string
fn
=
m_dataSet
->
getFile
N
ame
();
std
::
string
fn
=
m_dataSet
->
getFile
n
ame
();
std
::
string
ext
(
".nii.gz"
);
std
::
string
csvExt
(
".csv"
);
fn
.
replace
(
fn
.
find
(
ext
),
ext
.
size
(),
csvExt
);
...
...
src/modules/bermanTracking/WMBermanTracking.cpp
View file @
189eca71
...
...
@@ -250,7 +250,7 @@ void WMBermanTracking::moduleMain()
boost
::
shared_ptr
<
WValueSet
<
float
>
>
vs
(
new
WValueSet
<
float
>
(
0
,
1
,
m_hits
,
DataType
<
float
>::
type
)
);
m_result
=
boost
::
shared_ptr
<
WDataSetScalar
>
(
new
WDataSetScalar
(
vs
,
m_dataSet
->
getGrid
()
)
);
m_result
->
setFile
N
ame
(
"Berman_prob_tracking_result"
);
m_result
->
setFile
n
ame
(
"Berman_prob_tracking_result"
);
m_result
->
getTexture
()
->
threshold
()
->
set
(
0.05
f
);
m_result
->
getTexture
()
->
colormap
()
->
set
(
m_result
->
getTexture
()
->
colormap
()
->
get
().
newSelector
(
WItemSelector
::
IndexList
(
1
,
2
)
)
);
...
...
src/modules/clusterDisplay/WMClusterDisplay.cpp
View file @
189eca71
...
...
@@ -393,7 +393,7 @@ void WMClusterDisplay::moduleMain()
if
(
m_dataSet
!=
m_fiberInput
->
getData
()
)
{
m_dataSet
=
m_fiberInput
->
getData
();
std
::
string
fn
=
m_dataSet
->
getFile
N
ame
();
std
::
string
fn
=
m_dataSet
->
getFile
n
ame
();
std
::
string
ext
(
".fib"
);
std
::
string
csvExt
(
"_hie.txt"
);
fn
.
replace
(
fn
.
find
(
ext
),
ext
.
size
(),
csvExt
);
...
...
src/modules/data/io/WPagerEEGLibeep.cpp
View file @
189eca71
...
...
@@ -51,18 +51,18 @@ WPagerEEGLibeep::WPagerEEGLibeep( std::string fileName )
std
::
setlocale
(
LC_NUMERIC
,
"C"
);
// initialize
std
::
FILE
*
file
=
std
::
fopen
(
m_fileName
.
c_str
(),
"rb"
);
std
::
FILE
*
file
=
std
::
fopen
(
getFilename
()
.
c_str
(),
"rb"
);
if
(
!
file
)
{
throw
WDHNoSuchFile
(
m_fileName
+
" could not be opened"
);
throw
WDHNoSuchFile
(
getFilename
()
+
" could not be opened"
);
}
int
status
;
m_eeg
=
eep_init_from_file
(
m_fileName
.
c_str
(),
file
,
&
status
);
m_eeg
=
eep_init_from_file
(
getFilename
()
.
c_str
(),
file
,
&
status
);
if
(
status
!=
CNTERR_NONE
||
!
m_eeg
)
{
std
::
ostringstream
stream
;
stream
<<
m_fileName
<<
" could not be initialized. Libeep status code: "
<<
status
;
stream
<<
getFilename
()
<<
" could not be initialized. Libeep status code: "
<<
status
;
throw
WDHIOFailure
(
stream
.
str
()
);
}
...
...
@@ -83,7 +83,7 @@ WPagerEEGLibeep::~WPagerEEGLibeep()
if
(
status
!=
CNTERR_NONE
)
{
std
::
ostringstream
stream
;
stream
<<
m_fileName
<<
" could not be closed. Libeep status code: "
<<
status
;
stream
<<
getFilename
()
<<
" could not be closed. Libeep status code: "
<<
status
;
throw
WDHIOFailure
(
stream
.
str
()
);
}
}
...
...
@@ -103,7 +103,7 @@ std::size_t WPagerEEGLibeep::getNumberOfSamples( std::size_t segmentID ) const
if
(
segmentID
!=
0
)
{
std
::
ostringstream
stream
;
stream
<<
m_fileName
<<
" has no segment number "
<<
segmentID
;
stream
<<
getFilename
()
<<
" has no segment number "
<<
segmentID
;
throw
WOutOfBounds
(
stream
.
str
()
);
}
...
...
@@ -115,14 +115,14 @@ boost::shared_ptr< WEEGValueMatrix > WPagerEEGLibeep::getValues( std::size_t seg
if
(
segmentID
!=
0
)
{
std
::
ostringstream
stream
;
stream
<<
m_fileName
<<
" has no segment number "
<<
segmentID
;
stream
<<
getFilename
()
<<
" has no segment number "
<<
segmentID
;
throw
WOutOfBounds
(
stream
.
str
()
);
}
if
(
start
+
length
>
m_nbSamples
)
{
std
::
ostringstream
stream
;
stream
<<
"Could not read sample number "
<<
start
+
length
-
1
<<
" of file "
<<