Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
d2b9f459
Commit
d2b9f459
authored
Mar 02, 2014
by
Christian Schulte zu Berge
Browse files
Merge branch 'fix-cppcheck-issues' into 'development'
Fix Cppcheck Issues
parents
ef127d10
a7c1e91a
Changes
25
Show whitespace changes
Inline
Side-by-side
application/gui/datacontainertreewidget.cpp
View file @
d2b9f459
...
...
@@ -157,15 +157,15 @@ namespace campvis {
if
(
const
AbstractData
*
data
=
_dataHandle
.
getData
())
{
if
(
const
RenderData
*
tester
=
dynamic_cast
<
const
RenderData
*>
(
data
))
{
for
(
size_t
i
=
0
;
i
<
tester
->
getNumColorTextures
();
++
i
)
{
DataHandleTreeItem
*
dhti
=
new
DataHandleTreeItem
(
QtDataHandle
(
tester
->
getColorDataHandle
(
i
)),
_name
+
"::ColorTexture"
+
StringUtils
::
toString
(
i
),
this
);
new
DataHandleTreeItem
(
QtDataHandle
(
tester
->
getColorDataHandle
(
i
)),
_name
+
"::ColorTexture"
+
StringUtils
::
toString
(
i
),
this
);
}
if
(
tester
->
hasDepthTexture
())
{
DataHandleTreeItem
*
dhti
=
new
DataHandleTreeItem
(
QtDataHandle
(
tester
->
getDepthDataHandle
()),
_name
+
"::DepthTexture"
,
this
);
new
DataHandleTreeItem
(
QtDataHandle
(
tester
->
getDepthDataHandle
()),
_name
+
"::DepthTexture"
,
this
);
}
}
else
if
(
const
ImageSeries
*
tester
=
dynamic_cast
<
const
ImageSeries
*>
(
data
))
{
for
(
size_t
i
=
0
;
i
<
tester
->
getNumImages
();
++
i
)
{
DataHandleTreeItem
*
dhti
=
new
DataHandleTreeItem
(
QtDataHandle
(
tester
->
getImage
(
i
)),
_name
+
"::Image"
+
StringUtils
::
toString
(
i
),
this
);
new
DataHandleTreeItem
(
QtDataHandle
(
tester
->
getImage
(
i
)),
_name
+
"::Image"
+
StringUtils
::
toString
(
i
),
this
);
}
}
...
...
application/gui/logviewerwidget.cpp
View file @
d2b9f459
...
...
@@ -138,7 +138,7 @@ namespace campvis {
_logDisplay
->
clear
();
_logHighlighter
->
setFilterRegExp
(
_filterRegExp
);
for
(
std
::
deque
<
LogEntry
>::
iterator
it
=
_logMessages
.
begin
();
it
!=
_logMessages
.
end
();
it
++
)
{
for
(
std
::
deque
<
LogEntry
>::
iterator
it
=
_logMessages
.
begin
();
it
!=
_logMessages
.
end
();
++
it
)
{
displayMessage
(
*
it
);
}
}
...
...
application/gui/pipelinetreewidget.cpp
View file @
d2b9f459
...
...
@@ -303,7 +303,7 @@ namespace campvis {
PipelineTreeItem
*
pipeti
=
new
PipelineTreeItem
(
*
pipe
,
it
->
second
);
for
(
std
::
vector
<
AbstractProcessor
*>::
const_iterator
proc
=
(
*
pipe
)
->
getProcessors
().
begin
();
proc
!=
(
*
pipe
)
->
getProcessors
().
end
();
++
proc
)
{
ProcessorTreeItem
*
procti
=
new
ProcessorTreeItem
(
*
proc
,
pipeti
);
new
ProcessorTreeItem
(
*
proc
,
pipeti
);
}
}
else
{
...
...
application/gui/properties/abstractpropertywidget.cpp
View file @
d2b9f459
...
...
@@ -58,6 +58,7 @@ namespace campvis {
}
_property
->
s_changed
.
connect
(
this
,
&
AbstractPropertyWidget
::
onPropertyChanged
);
// cppcheck-suppress pureVirtualCall
connect
(
this
,
SIGNAL
(
s_propertyChanged
(
const
AbstractProperty
*
)),
this
,
SLOT
(
updateWidgetFromProperty
()));
}
...
...
application/gui/properties/geometry1dtransferfunctioneditor.cpp
View file @
d2b9f459
...
...
@@ -95,7 +95,6 @@ namespace campvis {
void
Geometry1DTransferFunctionEditor
::
paint
()
{
Geometry1DTransferFunction
*
gtf
=
static_cast
<
Geometry1DTransferFunction
*>
(
_transferFunction
);
const
std
::
vector
<
TFGeometry1D
*>&
geometries
=
gtf
->
getGeometries
();
const
tgt
::
vec2
&
intensityDomain
=
gtf
->
getIntensityDomain
();
// TODO: get rid of intermediate mode?
glPushAttrib
(
GL_ALL_ATTRIB_BITS
);
...
...
@@ -120,18 +119,16 @@ namespace campvis {
maxFilling
=
log
(
maxFilling
);
float
xl
=
static_cast
<
float
>
(
0.
f
)
/
static_cast
<
float
>
(
numBuckets
);
float
xr
=
0.
f
;
float
yl
=
(
_logScale
?
log
(
static_cast
<
float
>
(
ih
->
getNumElements
(
0
)))
/
maxFilling
:
static_cast
<
float
>
(
ih
->
getNumElements
(
0
))
/
maxFilling
);
float
yr
=
0.
f
;
glBegin
(
GL_QUADS
);
glColor4f
(
1.
f
,
.75
f
,
0.
f
,
.5
f
);
for
(
size_t
i
=
1
;
i
<
numBuckets
;
++
i
)
{
xr
=
static_cast
<
float
>
(
i
)
/
static_cast
<
float
>
(
numBuckets
);
yr
=
(
_logScale
float
xr
=
static_cast
<
float
>
(
i
)
/
static_cast
<
float
>
(
numBuckets
);
float
yr
=
(
_logScale
?
std
::
max
(
0.
f
,
static_cast
<
float
>
(
log
(
static_cast
<
float
>
(
ih
->
getNumElements
(
i
))))
/
maxFilling
)
:
static_cast
<
float
>
(
ih
->
getNumElements
(
i
))
/
maxFilling
);
...
...
@@ -139,9 +136,6 @@ namespace campvis {
glVertex2f
(
xl
,
yl
);
glVertex2f
(
xr
,
yr
);
glVertex2f
(
xr
,
0.
f
);
xl
=
xr
;
yl
=
yr
;
}
glEnd
();
}
...
...
@@ -248,7 +242,7 @@ namespace campvis {
QLabel
*
lblOpacityBottom
=
new
QLabel
(
tr
(
"0%"
),
this
);
_layout
->
addWidget
(
lblOpacityBottom
,
3
,
0
,
1
,
1
,
Qt
::
AlignRight
);
_canvas
=
new
tgt
::
QtThreadedCanvas
(
""
,
tgt
::
ivec2
(
256
,
128
),
tgt
::
GLCanvas
::
RGBA_BUFFER
,
false
);
_canvas
=
new
tgt
::
QtThreadedCanvas
(
""
,
tgt
::
ivec2
(
256
,
128
),
tgt
::
GLCanvas
::
RGBA_BUFFER
,
0
,
false
);
tgt
::
GlContextManager
::
getRef
().
registerContextAndInitGlew
(
_canvas
);
GLJobProc
.
registerContext
(
_canvas
);
...
...
application/gui/properties/geometry2dtransferfunctioneditor.cpp
View file @
d2b9f459
...
...
@@ -91,7 +91,6 @@ namespace campvis {
void
Geometry2DTransferFunctionEditor
::
paint
()
{
Geometry2DTransferFunction
*
gtf
=
static_cast
<
Geometry2DTransferFunction
*>
(
_transferFunction
);
const
std
::
vector
<
TFGeometry2D
*>&
geometries
=
gtf
->
getGeometries
();
const
tgt
::
vec2
&
intensityDomain
=
gtf
->
getIntensityDomain
();
// TODO: get rid of intermediate mode?
glPushAttrib
(
GL_ALL_ATTRIB_BITS
);
...
...
@@ -122,15 +121,13 @@ namespace campvis {
float
maxFilling
=
static_cast
<
float
>
(
ih
->
getMaxFilling
());
float
xl
=
static_cast
<
float
>
(
0.
f
)
/
static_cast
<
float
>
(
numBuckets
);
float
xr
=
0.
f
;
float
yl
=
static_cast
<
float
>
(
ih
->
getNumElements
(
0
))
/
maxFilling
;
float
yr
=
0.
f
;
glBegin
(
GL_QUADS
);
glColor4f
(
1.
f
,
.75
f
,
0.
f
,
.5
f
);
for
(
size_t
i
=
1
;
i
<
numBuckets
;
++
i
)
{
xr
=
static_cast
<
float
>
(
i
)
/
static_cast
<
float
>
(
numBuckets
);
yr
=
static_cast
<
float
>
(
ih
->
getNumElements
(
i
))
/
maxFilling
;
float
xr
=
static_cast
<
float
>
(
i
)
/
static_cast
<
float
>
(
numBuckets
);
float
yr
=
static_cast
<
float
>
(
ih
->
getNumElements
(
i
))
/
maxFilling
;
glVertex2f
(
xl
,
0.
f
);
glVertex2f
(
xl
,
yl
);
...
...
@@ -229,7 +226,7 @@ namespace campvis {
QLabel
*
lblOpacityBottom
=
new
QLabel
(
tr
(
"0%"
),
this
);
_layout
->
addWidget
(
lblOpacityBottom
,
3
,
0
,
1
,
1
,
Qt
::
AlignRight
);
_canvas
=
new
tgt
::
QtThreadedCanvas
(
""
,
tgt
::
ivec2
(
256
,
128
),
tgt
::
GLCanvas
::
RGBA_BUFFER
,
false
);
_canvas
=
new
tgt
::
QtThreadedCanvas
(
""
,
tgt
::
ivec2
(
256
,
128
),
tgt
::
GLCanvas
::
RGBA_BUFFER
,
0
,
false
);
tgt
::
GlContextManager
::
getRef
().
registerContextAndInitGlew
(
_canvas
);
GLJobProc
.
registerContext
(
_canvas
);
...
...
application/gui/properties/simpletransferfunctioneditor.cpp
View file @
d2b9f459
...
...
@@ -65,8 +65,8 @@ namespace campvis {
SimpleTransferFunction
*
stf
=
static_cast
<
SimpleTransferFunction
*>
(
_transferFunction
);
_cpwColorLeft
->
blockSignals
(
true
);
_cpwColorRight
->
blockSignals
(
true
);
_cpwColorLeft
->
setColor
(
QtColorTools
::
toQColor
(
st
atic_cast
<
SimpleTransferFunction
*>
(
_transferFunction
)
->
getLeftColor
()));
_cpwColorRight
->
setColor
(
QtColorTools
::
toQColor
(
st
atic_cast
<
SimpleTransferFunction
*>
(
_transferFunction
)
->
getRightColor
()));
_cpwColorLeft
->
setColor
(
QtColorTools
::
toQColor
(
st
f
->
getLeftColor
()));
_cpwColorRight
->
setColor
(
QtColorTools
::
toQColor
(
st
f
->
getRightColor
()));
_cpwColorLeft
->
blockSignals
(
false
);
_cpwColorRight
->
blockSignals
(
false
);
}
...
...
core/datastructures/renderdata.cpp
View file @
d2b9f459
...
...
@@ -50,13 +50,13 @@ namespace campvis {
for
(
size_t
i
=
0
;
i
<
TGT_FRAMEBUFFEROBJECT_MAX_SUPPORTED_COLOR_ATTACHMENTS
;
++
i
)
{
if
(
attachments
[
i
]
!=
0
)
{
ImageData
*
img
=
new
ImageData
(
2
,
attachments
[
i
]
->
getDimensions
(),
attachments
[
i
]
->
getNumChannels
());
ImageRepresentationGL
*
rep
=
ImageRepresentationGL
::
create
(
img
,
attachments
[
i
]);
ImageRepresentationGL
::
create
(
img
,
attachments
[
i
]);
_colorTextures
.
push_back
(
DataHandle
(
img
));
}
}
if
(
attachments
[
TGT_FRAMEBUFFEROBJECT_MAX_SUPPORTED_COLOR_ATTACHMENTS
]
!=
0
)
{
ImageData
*
img
=
new
ImageData
(
2
,
attachments
[
TGT_FRAMEBUFFEROBJECT_MAX_SUPPORTED_COLOR_ATTACHMENTS
]
->
getDimensions
(),
attachments
[
TGT_FRAMEBUFFEROBJECT_MAX_SUPPORTED_COLOR_ATTACHMENTS
]
->
getNumChannels
());
ImageRepresentationGL
*
rep
=
ImageRepresentationGL
::
create
(
img
,
attachments
[
TGT_FRAMEBUFFEROBJECT_MAX_SUPPORTED_COLOR_ATTACHMENTS
]);
ImageRepresentationGL
::
create
(
img
,
attachments
[
TGT_FRAMEBUFFEROBJECT_MAX_SUPPORTED_COLOR_ATTACHMENTS
]);
_depthTexture
=
DataHandle
(
img
);
}
}
...
...
core/eventhandlers/trackballnavigationeventlistener.cpp
View file @
d2b9f459
...
...
@@ -146,8 +146,10 @@ namespace campvis {
void
TrackballNavigationEventListener
::
removeLqModeProcessor
(
VisualizationProcessor
*
vp
)
{
for
(
std
::
vector
<
VisualizationProcessor
*>::
iterator
it
=
_lqModeProcessors
.
begin
();
it
!=
_lqModeProcessors
.
end
();
++
it
)
{
if
(
*
it
==
vp
)
if
(
*
it
==
vp
)
{
_lqModeProcessors
.
erase
(
it
);
return
;
}
}
}
...
...
ext/tgt/filesystem.cpp
View file @
d2b9f459
...
...
@@ -568,7 +568,7 @@ std::vector<std::string> TarFileFactory::getFilenames() {
std
::
vector
<
std
::
string
>
files
;
std
::
map
<
std
::
string
,
ArchivedFile
>::
iterator
theIterator
;
for
(
theIterator
=
files_
.
begin
();
theIterator
!=
files_
.
end
();
theIterator
++
)
for
(
theIterator
=
files_
.
begin
();
theIterator
!=
files_
.
end
();
++
theIterator
)
files
.
push_back
((
*
theIterator
).
first
);
return
files
;
...
...
@@ -627,7 +627,7 @@ bool FileSystem::exists(const std::string& filename) {
void
FileSystem
::
addFactory
(
FileFactory
*
ff
)
{
std
::
vector
<
std
::
string
>
files
=
ff
->
getFilenames
();
std
::
vector
<
std
::
string
>::
iterator
theIterator
;
for
(
theIterator
=
files
.
begin
();
theIterator
!=
files
.
end
();
theIterator
++
)
for
(
theIterator
=
files
.
begin
();
theIterator
!=
files
.
end
();
++
theIterator
)
virtualFS_
[
*
theIterator
]
=
ff
;
factories_
.
push_back
(
ff
);
...
...
@@ -1156,7 +1156,6 @@ std::vector<std::string> FileSystem::listFiles(const std::string& directory, con
WIN32_FIND_DATA
findFileData
=
{
0
};
HANDLE
hFind
=
0
;
std
::
stack
<
std
::
string
>
stackDirs
;
std
::
string
dir
(
converted
+
"
\\
*"
);
hFind
=
FindFirstFile
(
dir
.
c_str
(),
&
findFileData
);
...
...
ext/tgt/glcanvas.cpp
View file @
d2b9f459
...
...
@@ -113,81 +113,6 @@ bool GLCanvas::getAutoFlush() {
return
autoFlush_
;
}
bool
GLCanvas
::
takeScreenshot
(
std
::
string
fname
)
{
//taken from gamedev.net forum:
FILE
*
pFile
;
// The file pointer.
unsigned
char
uselessChar
;
// used for useless char.
short
int
uselessInt
;
// used for useless int.
unsigned
char
imageType
;
// Type of image we are saving.
int
index
;
// used with the for loop.
unsigned
char
bits
;
// Bit depth.
long
Size
;
// Size of the picture.
int
colorMode
;
unsigned
char
tempColors
;
short
int
width
=
getWidth
();
short
int
height
=
getHeight
();
// Open file for output.
pFile
=
fopen
(
fname
.
c_str
(),
"wb"
);
// Check if the file opened or not.
if
(
!
pFile
)
{
fclose
(
pFile
);
return
false
;
}
unsigned
char
*
image
=
new
unsigned
char
[
getWidth
()
*
getHeight
()
*
3
];
//read image from gl:
glReadPixels
(
0
,
0
,
getWidth
(),
getHeight
(),
GL_RGB
,
GL_UNSIGNED_BYTE
,
image
);
// Set the image type, the color mode, and the bit depth.
imageType
=
2
;
colorMode
=
3
;
bits
=
24
;
// Set these two to 0.
uselessChar
=
0
;
uselessInt
=
0
;
// Write useless data.
size_t
written
=
0
;
written
+=
fwrite
(
&
uselessChar
,
sizeof
(
unsigned
char
),
1
,
pFile
);
written
+=
fwrite
(
&
uselessChar
,
sizeof
(
unsigned
char
),
1
,
pFile
);
// Now image type.
written
+=
fwrite
(
&
imageType
,
sizeof
(
unsigned
char
),
1
,
pFile
);
// Write useless data.
written
+=
fwrite
(
&
uselessInt
,
sizeof
(
short
int
),
1
,
pFile
);
written
+=
fwrite
(
&
uselessInt
,
sizeof
(
short
int
),
1
,
pFile
);
written
+=
fwrite
(
&
uselessChar
,
sizeof
(
unsigned
char
),
1
,
pFile
);
written
+=
fwrite
(
&
uselessInt
,
sizeof
(
short
int
),
1
,
pFile
);
written
+=
fwrite
(
&
uselessInt
,
sizeof
(
short
int
),
1
,
pFile
);
// Write the size that you want.
written
+=
fwrite
(
&
width
,
sizeof
(
short
int
),
1
,
pFile
);
written
+=
fwrite
(
&
height
,
sizeof
(
short
int
),
1
,
pFile
);
written
+=
fwrite
(
&
bits
,
sizeof
(
unsigned
char
),
1
,
pFile
);
// Write useless data.
written
+=
fwrite
(
&
uselessChar
,
sizeof
(
unsigned
char
),
1
,
pFile
);
// Get image size.
Size
=
width
*
height
*
colorMode
;
// Now switch image from RGB to BGR.
for
(
index
=
0
;
index
<
Size
;
index
+=
colorMode
){
tempColors
=
image
[
index
];
image
[
index
]
=
image
[
index
+
2
];
image
[
index
+
2
]
=
tempColors
;
}
// Finally write the image.
written
+=
fwrite
(
image
,
sizeof
(
unsigned
char
),
Size
,
pFile
);
// close the file.
fclose
(
pFile
);
delete
[]
image
;
return
(
written
>
0
);
}
const
ivec4
&
GLCanvas
::
getRgbaSize
()
const
{
return
rgbaSize_
;
}
...
...
ext/tgt/glcanvas.h
View file @
d2b9f459
...
...
@@ -150,10 +150,6 @@ public:
/// wheater canvas automatically calls glFlush or swap
bool
getAutoFlush
();
///Take a screenshot and save it as TGA file.
///@param fname Target filename
bool
takeScreenshot
(
std
::
string
fname
);
/// Getter
const
ivec4
&
getRgbaSize
()
const
;
...
...
ext/tgt/guiapplication.cpp
View file @
d2b9f459
...
...
@@ -52,9 +52,9 @@ void GUIApplication::removeCanvas(GLCanvas* canvas) {
}
void
GUIApplication
::
initCanvases
()
{
std
::
list
<
GLCanvas
*>::
iterator
iter
;
for
(
iter
=
canvases_
.
begin
();
iter
!=
canvases_
.
end
();
iter
++
)
{
if
(
!
(
*
iter
)
->
isInitialized
())
(
*
iter
)
->
init
();
for
(
std
::
list
<
GLCanvas
*>::
iterator
iter
=
canvases_
.
begin
();
iter
!=
canvases_
.
end
();
++
iter
)
{
if
(
!
(
*
iter
)
->
isInitialized
())
(
*
iter
)
->
init
();
}
}
...
...
ext/tgt/logmanager.cpp
View file @
d2b9f459
...
...
@@ -297,7 +297,7 @@ LogManager::LogManager(const std::string& logDir)
LogManager
::~
LogManager
()
{
vector
<
Log
*>::
iterator
it
;
for
(
it
=
logs_
.
begin
();
it
!=
logs_
.
end
();
it
++
)
for
(
it
=
logs_
.
begin
();
it
!=
logs_
.
end
();
++
it
)
delete
(
*
it
);
delete
consoleLog_
;
...
...
@@ -311,7 +311,7 @@ void LogManager::log(const std::string &cat, LogLevel level, const std::string &
const
std
::
string
&
extendedInfo
)
{
vector
<
Log
*>::
iterator
it
;
for
(
it
=
logs_
.
begin
();
it
!=
logs_
.
end
();
it
++
)
{
for
(
it
=
logs_
.
begin
();
it
!=
logs_
.
end
();
++
it
)
{
if
(
*
it
!=
0
)
(
*
it
)
->
log
(
cat
,
level
,
msg
,
extendedInfo
);
}
...
...
ext/tgt/naturalcubicspline.cpp
View file @
d2b9f459
...
...
@@ -121,10 +121,9 @@ int NaturalCubicSpline::lookup(float x) const {
else
{
int
i1
=
0
;
int
i2
=
size
-
2
;
int
i3
=
0
;
while
(
i2
-
i1
>
1
)
{
i3
=
i1
+
((
i2
-
i1
)
>>
1
);
int
i3
=
i1
+
((
i2
-
i1
)
>>
1
);
if
(
points_
[
i3
].
x
>
x
)
i2
=
i3
;
else
...
...
modules/devil/processors/devilimagereader.cpp
View file @
d2b9f459
...
...
@@ -56,7 +56,8 @@ namespace campvis {
,
p_url
(
"url"
,
"Image URL"
,
""
)
,
p_targetImageID
(
"targetImageName"
,
"Target Image ID"
,
"DevilImageReader.output"
,
DataNameProperty
::
WRITE
)
,
p_importType
(
"ImportType"
,
"Import Type"
,
importOptions
,
3
)
,
_devilTextureReader
(
0
)
,
_shader
(
nullptr
)
,
_devilTextureReader
(
nullptr
)
{
addProperty
(
&
p_url
);
addProperty
(
&
p_targetImageID
);
...
...
modules/io/processors/abstractimagereader.cpp
View file @
d2b9f459
...
...
@@ -46,7 +46,7 @@ namespace campvis {
void
AbstractImageReader
::
setTargetImageId
(
DataNameProperty
&
targetImageId
)
{
this
->
p_targetImageID
.
setValue
(
targetImageId
.
getValue
());
std
::
set
<
AbstractProperty
*>
sharedProperties
=
targetImageId
.
getSharedProperties
();
for
(
std
::
set
<
AbstractProperty
*>::
iterator
it
=
sharedProperties
.
begin
();
it
!=
sharedProperties
.
end
();
it
++
)
{
for
(
std
::
set
<
AbstractProperty
*>::
iterator
it
=
sharedProperties
.
begin
();
it
!=
sharedProperties
.
end
();
++
it
)
{
this
->
p_targetImageID
.
addSharedProperty
(
*
it
);
}
}
...
...
@@ -60,7 +60,7 @@ namespace campvis {
}
bool
AbstractImageReader
::
acceptsExtension
(
const
std
::
string
&
extension
)
{
for
(
std
::
vector
<
std
::
string
>::
iterator
it
=
this
->
_ext
.
begin
();
it
!=
this
->
_ext
.
end
();
it
++
)
{
for
(
std
::
vector
<
std
::
string
>::
iterator
it
=
this
->
_ext
.
begin
();
it
!=
this
->
_ext
.
end
();
++
it
)
{
if
(
*
it
==
extension
)
{
return
true
;
}
...
...
modules/io/processors/abstractimagereader.h
View file @
d2b9f459
...
...
@@ -79,8 +79,6 @@ namespace campvis {
protected:
std
::
vector
<
std
::
string
>
_ext
;
static
const
std
::
string
loggerCat_
;
private:
};
...
...
modules/io/processors/csvdimagereader.cpp
View file @
d2b9f459
...
...
@@ -66,7 +66,6 @@ namespace campvis {
size_t
dimensionality
=
3
;
tgt
::
svec3
size
;
WeaklyTypedPointer
::
BaseType
pt
;
size_t
numChannels
=
1
;
tgt
::
vec3
voxelSize
(
1.
f
);
tgt
::
vec3
imageOffset
(
0.
f
);
...
...
@@ -138,6 +137,8 @@ namespace campvis {
file
.
close
();
\
}
\
rep
=
GenericImageRepresentationLocal
<
C_TYPE
,
1
>::
create
(
image
,
dataArray
);
\
if
(
rep
==
0
)
\
delete
[]
dataArray
;
\
}
DISPATCH_PARSING
(
WeaklyTypedPointer
::
UINT8
,
uint8_t
,
uint16_t
)
...
...
modules/io/processors/genericimagereader.cpp
View file @
d2b9f459
...
...
@@ -67,7 +67,7 @@ namespace campvis {
}
void
GenericImageReader
::
deinit
()
{
for
(
std
::
map
<
AbstractImageReader
*
,
MetaProperty
*>::
iterator
it
=
this
->
_readers
.
begin
();
it
!=
this
->
_readers
.
end
();
it
++
)
{
for
(
std
::
map
<
AbstractImageReader
*
,
MetaProperty
*>::
iterator
it
=
this
->
_readers
.
begin
();
it
!=
this
->
_readers
.
end
();
++
it
)
{
if
(
nullptr
!=
it
->
first
)
delete
it
->
first
;
if
(
nullptr
!=
it
->
second
)
delete
it
->
second
;
}
...
...
@@ -128,7 +128,7 @@ namespace campvis {
if
(
it
!=
this
->
_readers
.
end
())
{
(
it
->
first
)
->
p_targetImageID
.
setValue
(
targetImageId
.
getValue
());
std
::
set
<
AbstractProperty
*>
sharedProperties
=
targetImageId
.
getSharedProperties
();
for
(
std
::
set
<
AbstractProperty
*>::
iterator
jt
=
sharedProperties
.
begin
();
jt
!=
sharedProperties
.
end
();
jt
++
)
{
for
(
std
::
set
<
AbstractProperty
*>::
iterator
jt
=
sharedProperties
.
begin
();
jt
!=
sharedProperties
.
end
();
++
jt
)
{
(
it
->
first
)
->
p_targetImageID
.
addSharedProperty
(
*
jt
);
}
}
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment