Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
104b5322
Commit
104b5322
authored
Jul 27, 2014
by
Christian Schulte zu Berge
Browse files
Removed a bunch of obsolete TODOs and FIXMEs.
parent
4d773a4f
Changes
19
Hide whitespace changes
Inline
Side-by-side
application/campvispainter.cpp
View file @
104b5322
...
...
@@ -125,7 +125,6 @@ namespace campvis {
void
CampVisPainter
::
init
()
{
try
{
// TODO: Remove hardcoded paths, and use ShdrMgr.addPath() at some central location
_copyShader
=
ShdrMgr
.
load
(
"core/glsl/passthrough.vert"
,
"core/glsl/copyimage.frag"
,
""
);
_copyShader
->
setAttributeLocation
(
0
,
"in_Position"
);
_copyShader
->
setAttributeLocation
(
1
,
"in_TexCoords"
);
...
...
application/gui/properties/geometry2dtransferfunctioneditor.cpp
View file @
104b5322
...
...
@@ -240,7 +240,7 @@ namespace campvis {
_lblIntensityRight
=
new
QLabel
(
QString
::
number
(
gtf
->
getIntensityDomain
().
y
),
this
);
_layout
->
addWidget
(
_lblIntensityRight
,
4
,
3
,
1
,
1
,
Qt
::
AlignRight
);
QVBoxLayout
*
buttonLayout
=
new
QVBoxLayout
();
// TODO: check whether buttonLayout will be deleted by Qt's GC!
QVBoxLayout
*
buttonLayout
=
new
QVBoxLayout
();
_layout
->
addLayout
(
buttonLayout
,
1
,
4
,
1
,
3
,
Qt
::
AlignTop
);
_btnAddGeometry
=
new
QPushButton
(
tr
(
"Add Geometry"
),
this
);
...
...
core/datastructures/abstractdata.h
View file @
104b5322
...
...
@@ -57,8 +57,6 @@ namespace campvis {
/**
* Abstract base class for data handled by a DataHandle and stored in a DataContainer.
*
* \todo
*/
class
CAMPVIS_CORE_API
AbstractData
{
friend
class
DataHandle
;
...
...
core/datastructures/datacontainer.h
View file @
104b5322
...
...
@@ -49,8 +49,6 @@ namespace campvis {
* also ensures (hopefully) that nobody can do messy things, such as changing the data while some other
* thread is reading it. Theoretically this should be possible, but a correct implementation would require
* some brain fuck.
*
* \todo Check thread-safety
*/
class
CAMPVIS_CORE_API
DataContainer
{
public:
...
...
core/datastructures/genericpointerdata.h
View file @
104b5322
...
...
@@ -28,11 +28,13 @@
#include
"core/datastructures/abstractdata.h"
#include
<string>
#include
<memory>
namespace
campvis
{
/**
* Class that generically wraps around a pointer of the template type and takes ownership of it.
* Ownership is handled through shared pointers, as the clone() method only returns a shallow copy.
* \tparam T Type of the pointer this AbstractData wraps around.
*/
template
<
typename
T
>
...
...
@@ -40,7 +42,7 @@ namespace campvis {
public:
/**
* Creates a new GenericPointerData and initializes its pointer with \a data.
* \param data The initial pointer for this data, may be 0, GenericPointerData takes owner
w
hip.
* \param data The initial pointer for this data, may be 0, GenericPointerData takes owner
s
hip.
*/
explicit
GenericPointerData
(
T
*
data
)
:
AbstractData
()
...
...
@@ -48,10 +50,19 @@ namespace campvis {
{};
/**
* Destructor, deletes the pointer.
* Creates a new GenericPointerData and initializes its pointer with \a data.
* \param data The initial pointer for this data, may be 0, GenericPointerData takes ownership.
*/
explicit
GenericPointerData
(
std
::
shared_ptr
<
T
>
data
)
:
AbstractData
()
,
_data
(
data
)
{};
/**
* Destructor
*/
virtual
~
GenericPointerData
()
{
delete
_data
;
};
/**
...
...
@@ -72,10 +83,10 @@ namespace campvis {
/**
* Sets the data to \a data.
* \param data The new pointer for this data, may be 0, GenericPointerData takes owner
w
hip.
* \param data The new pointer for this data, may be 0, GenericPointerData takes owner
s
hip.
*/
void
setData
(
T
*
data
)
{
_data
=
data
;
_data
=
std
::
shared_ptr
<
T
>
(
data
)
;
};
...
...
@@ -83,8 +94,7 @@ namespace campvis {
* Prototype - clone method, some people call this virtual constructor...
* \return A SHALLOW copy of this object.
*/
virtual
AbstractData
*
clone
()
const
{
// FIXME: This is only a shallow copy - not what you expect from clone!
virtual
GenericPointerData
<
T
>*
clone
()
const
{
return
new
GenericPointerData
<
T
>
(
_data
);
};
...
...
@@ -105,7 +115,7 @@ namespace campvis {
};
protected:
T
*
_data
;
///<
P
ointer to the data.
std
::
shared_ptr
<
T
>
_data
;
///<
Shared p
ointer to the data.
};
}
...
...
core/datastructures/imagerepresentationdisk.h
View file @
104b5322
...
...
@@ -33,8 +33,6 @@ namespace campvis {
/**
* Subclass of ImageData offering access to image data stored in binary form on the local harddisk.
*
* \todo Number of channels
*/
class
CAMPVIS_CORE_API
ImageRepresentationDisk
:
public
GenericAbstractImageRepresentation
<
ImageRepresentationDisk
>
{
public:
...
...
core/datastructures/imagerepresentationlocal.cpp
View file @
104b5322
...
...
@@ -68,7 +68,6 @@ namespace campvis {
}
{
// TODO: there is probably a more elegant method...
tbb
::
spin_mutex
::
scoped_lock
(
mutex
);
_normalizedIntensityRange
.
nibble
(
localMin
);
_normalizedIntensityRange
.
nibble
(
localMax
);
...
...
core/datastructures/imagerepresentationlocal.h
View file @
104b5322
...
...
@@ -37,8 +37,6 @@ namespace campvis {
/**
* Abstract base class for storing image data in the local memory.
*
* \todo implement padding, add some kind of cool iterators
*/
class
CAMPVIS_CORE_API
ImageRepresentationLocal
:
public
GenericAbstractImageRepresentation
<
ImageRepresentationLocal
>
{
public:
...
...
core/datastructures/lightsourcedata.h
View file @
104b5322
...
...
@@ -37,8 +37,6 @@ namespace campvis {
/**
* Abstract base class for data handled by a DataHandle and stored in a DataContainer.
*
* \todo
*/
class
CAMPVIS_CORE_API
LightSourceData
:
public
AbstractData
{
public:
...
...
core/properties/abstractproperty.h
View file @
104b5322
...
...
@@ -39,9 +39,6 @@
namespace
campvis
{
/**
* Abstract base class for CAMPVis Property.
*
* \todo Add PropertyWidgets, add clone()?
* Think about a reasonable locking mechanism and implement that
*/
class
CAMPVIS_CORE_API
AbstractProperty
{
public:
...
...
core/properties/genericproperty.h
View file @
104b5322
...
...
@@ -35,7 +35,6 @@ namespace campvis {
* Generic class for value-based properties.
*
* \tparam T Base type of the property's value.
* \todo Add PropertyWidgets, review use of mutex
*/
template
<
typename
T
>
class
GenericProperty
:
public
AbstractProperty
{
...
...
@@ -179,11 +178,9 @@ namespace campvis {
template
<
typename
T
>
void
campvis
::
GenericProperty
<
T
>::
setFrontValue
(
const
T
&
value
)
{
_value
=
value
;
// TODO: think about the correct/reasonable order of observer notification
// thread-safety might play a role thereby...
for
(
std
::
set
<
AbstractProperty
*>::
iterator
it
=
_sharedProperties
.
begin
();
it
!=
_sharedProperties
.
end
();
++
it
)
{
// We ensure all shared properties to be of type GenericProperty<T> in the addSharedProperty overload.
// Hence, static_cast is
t
safe.
// Hence, static_cast is safe.
GenericProperty
<
T
>*
child
=
static_cast
<
GenericProperty
<
T
>*
>
(
*
it
);
child
->
setValue
(
value
);
}
...
...
core/tools/stringutils.h
View file @
104b5322
...
...
@@ -39,8 +39,6 @@ namespace campvis {
* Collection of various helper methods for strings.
*
* \sa std::string
*
* \todo Test, test, test!
*/
class
CAMPVIS_CORE_API
StringUtils
{
public:
...
...
ext/tgt/curve.h
View file @
104b5322
...
...
@@ -34,8 +34,6 @@
namespace
tgt
{
/// \todo Bounds
/**
This class is an abstract superclass for spacecurves. \n
It provides the virtual methods getPoint() and getDerivative(), which
...
...
modules/advancedusvis/pipelines/advancedusvis.cpp
View file @
104b5322
...
...
@@ -107,7 +107,6 @@ namespace campvis {
_quadView
.
p_outputImage
.
setValue
(
"quadview.output"
);
// TODO: replace this hardcoded domain by automatically determined from image min/max values
Geometry1DTransferFunction
*
tf
=
new
Geometry1DTransferFunction
(
128
,
tgt
::
vec2
(
0.
f
,
1.
f
));
tf
->
addGeometry
(
TFGeometry1D
::
createQuad
(
tgt
::
vec2
(
0.
f
,
1.
f
),
tgt
::
col4
(
0
,
0
,
0
,
255
),
tgt
::
col4
(
255
,
255
,
255
,
255
)));
_usFusion1
.
p_transferFunction
.
replaceTF
(
tf
);
...
...
modules/advancedusvis/pipelines/cmbatchgeneration.cpp
View file @
104b5322
...
...
@@ -109,7 +109,6 @@ namespace campvis {
_usBlurFilter
.
p_sigma
.
setValue
(
2.
f
);
// TODO: replace this hardcoded domain by automatically determined from image min/max values
Geometry1DTransferFunction
*
tf
=
new
Geometry1DTransferFunction
(
128
,
tgt
::
vec2
(
0.
f
,
1.
f
));
tf
->
addGeometry
(
TFGeometry1D
::
createQuad
(
tgt
::
vec2
(
0.
f
,
1.
f
),
tgt
::
col4
(
0
,
0
,
0
,
255
),
tgt
::
col4
(
255
,
255
,
255
,
255
)));
_usFusion
.
p_transferFunction
.
replaceTF
(
tf
);
...
...
modules/io/processors/mhdimagereader.cpp
View file @
104b5322
...
...
@@ -133,7 +133,6 @@ namespace campvis {
if
(
tfp
.
hasKey
(
"ElementByteOrderMSB"
))
e
=
(
tfp
.
getBool
(
"ElementByteOrderMSB"
)
?
EndianHelper
::
IS_BIG_ENDIAN
:
EndianHelper
::
IS_LITTLE_ENDIAN
);
// TODO: spacing, element size, etc.
if
(
tfp
.
hasKey
(
"ElementSpacing"
))
{
if
(
dimensionality
==
3
)
voxelSize
=
tfp
.
getVec3
(
"ElementSpacing"
);
...
...
modules/itk/core/genericimagerepresentationitk.h
View file @
104b5322
...
...
@@ -191,9 +191,6 @@ namespace campvis {
/// \see AbstractImageRepresentation::getVideoMemoryFootprint()
virtual
size_t
getVideoMemoryFootprint
()
const
;
/// \see AbstractImageRepresentation::getSubImage
virtual
ThisType
*
getSubImage
(
ImageData
*
parent
,
const
tgt
::
svec3
&
llf
,
const
tgt
::
svec3
&
urb
)
const
;
/**
* Returns a WeaklyTypedPointer to the image data.
* \note The pointer is still owned by this ImageRepresentationLocal. If you want a copy, use clone().
...
...
@@ -267,13 +264,6 @@ namespace campvis {
return
0
;
}
template
<
typename
BASETYPE
,
size_t
NUMCHANNELS
,
size_t
DIMENSIONALITY
>
GenericImageRepresentationItk
<
BASETYPE
,
NUMCHANNELS
,
DIMENSIONALITY
>*
campvis
::
GenericImageRepresentationItk
<
BASETYPE
,
NUMCHANNELS
,
DIMENSIONALITY
>::
getSubImage
(
ImageData
*
parent
,
const
tgt
::
svec3
&
llf
,
const
tgt
::
svec3
&
urb
)
const
{
tgtAssert
(
tgt
::
hand
(
tgt
::
lessThan
(
llf
,
urb
)),
"Coordinates in LLF must be component-wise smaller than the ones in URB!"
);
// TODO: implement - there certainly exists an ITK filter for this...
return
0
;
}
template
<
typename
BASETYPE
,
size_t
NUMCHANNELS
,
size_t
DIMENSIONALITY
>
WeaklyTypedPointer
campvis
::
GenericImageRepresentationItk
<
BASETYPE
,
NUMCHANNELS
,
DIMENSIONALITY
>::
getWeaklyTypedPointer
()
const
{
return
WeaklyTypedPointer
(
TypeTraits
<
BASETYPE
,
NUMCHANNELS
>::
weaklyTypedPointerBaseType
,
NUMCHANNELS
,
_itkImage
->
GetBufferPointer
());
...
...
modules/vis/pipelines/slicevis.cpp
View file @
104b5322
...
...
@@ -57,7 +57,6 @@ namespace campvis {
_sliceExtractor
.
p_xSliceNumber
.
setValue
(
0
);
// TODO: replace this hardcoded domain by automatically determined from image min/max values
Geometry1DTransferFunction
*
tf
=
new
Geometry1DTransferFunction
(
128
,
tgt
::
vec2
(
0.
f
,
.08
f
));
tf
->
addGeometry
(
TFGeometry1D
::
createQuad
(
tgt
::
vec2
(
0.
f
,
1.
f
),
tgt
::
col4
(
0
,
0
,
0
,
0
),
tgt
::
col4
(
255
,
255
,
255
,
255
)));
_sliceExtractor
.
p_transferFunction
.
replaceTF
(
tf
);
...
...
modules/vis/processors/eepgenerator.cpp
View file @
104b5322
...
...
@@ -120,8 +120,6 @@ namespace campvis {
-
2
*
n
.
x
*
n
.
y
,
1
-
2
*
n
.
y
*
n
.
y
,
-
2
*
n
.
z
*
n
.
y
,
0
,
-
2
*
n
.
x
*
n
.
z
,
-
2
*
n
.
y
*
n
.
z
,
1
-
2
*
n
.
z
*
n
.
z
,
0
,
2
*
n
.
x
*
k
,
2
*
n
.
y
*
k
,
2
*
n
.
z
*
k
,
1
));
// TODO: double check, whether matrix transpose is necessary
}
else
{
LERROR
(
"No suitable virtual mirror geometry found."
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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