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
42f4ff45
Commit
42f4ff45
authored
Mar 02, 2014
by
Christian Schulte zu Berge
Browse files
Merge branch 'campvis-core-dll' into 'development'
Campvis Core Dll
parents
0be65bc3
92a0b826
Changes
63
Hide whitespace changes
Inline
Side-by-side
core/CMakeLists.txt
View file @
42f4ff45
...
...
@@ -4,6 +4,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
MESSAGE
(
STATUS
"Configuring CAMPVis Core"
)
# configuration
IF
(
CAMPVIS_SHARED_LIBS
)
SET
(
BUILD_SHARED_LIBS TRUE
)
IF
(
MSVC
)
ADD_DEFINITIONS
(
"-DCAMPVIS_CORE_BUILD_DLL"
)
ENDIF
()
ENDIF
()
# glob sources from core directories
FILE
(
GLOB CampvisCoreSources RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
classification/*.cpp
...
...
@@ -23,6 +31,7 @@ ENDFOREACH()
FILE
(
GLOB CampvisCoreHeaders RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*.h
classification/*.h
datastructures/*.h
eventhandlers/*.h
...
...
core/classification/abstracttransferfunction.h
View file @
42f4ff45
...
...
@@ -30,6 +30,7 @@
#include
<tbb/atomic.h>
#include
<tbb/mutex.h>
#include
"core/coreapi.h"
#include
"core/datastructures/datahandle.h"
#include
"core/tools/concurrenthistogram.h"
...
...
@@ -56,7 +57,7 @@ namespace campvis {
* context. Even though other internals might be changed meanwhile, this ensures that
* the OpenGL stuff (e.g. the texture) stays valid for this time.
*/
class
AbstractTransferFunction
{
class
CAMPVIS_CORE_API
AbstractTransferFunction
{
public:
typedef
ConcurrentGenericHistogramND
<
float
,
1
>
IntensityHistogramType
;
...
...
core/classification/genericgeometrytransferfunction.h
View file @
42f4ff45
...
...
@@ -43,7 +43,7 @@ namespace campvis {
* \tparam T Type of the base geometry class.
*/
template
<
class
T
>
class
GenericGeometryTransferFunction
:
public
AbstractTransferFunction
,
public
sigslot
::
has_slots
<>
{
class
GenericGeometryTransferFunction
:
public
AbstractTransferFunction
,
public
sigslot
::
has_slots
<>
{
public:
/// Typedef for the geometry class this transfer function is built from.
typedef
T
GeometryType
;
...
...
core/classification/geometry1dtransferfunction.h
View file @
42f4ff45
...
...
@@ -36,7 +36,7 @@ namespace campvis {
/**
* A 1D transfer function built from multiple geometries.
*/
class
Geometry1DTransferFunction
:
public
GenericGeometryTransferFunction
<
TFGeometry1D
>
{
class
CAMPVIS_CORE_API
Geometry1DTransferFunction
:
public
GenericGeometryTransferFunction
<
TFGeometry1D
>
{
public:
/**
* Creates a new Geometry1DTransferFunction.
...
...
core/classification/geometry2dtransferfunction.h
View file @
42f4ff45
...
...
@@ -36,7 +36,7 @@ namespace campvis {
/**
* A 2D transfer function built from multiple geometries.
*/
class
Geometry2DTransferFunction
:
public
GenericGeometryTransferFunction
<
TFGeometry2D
>
{
class
CAMPVIS_CORE_API
Geometry2DTransferFunction
:
public
GenericGeometryTransferFunction
<
TFGeometry2D
>
{
public:
/**
* Creates a new Geometry2DTransferFunction.
...
...
core/classification/simpletransferfunction.h
View file @
42f4ff45
...
...
@@ -32,7 +32,7 @@ namespace campvis {
/**
* A very simple ramp transfer function, just for testing purposes...
*/
class
SimpleTransferFunction
:
public
AbstractTransferFunction
{
class
CAMPVIS_CORE_API
SimpleTransferFunction
:
public
AbstractTransferFunction
{
public:
/**
* Creates a new SimpleTransferFunction.
...
...
core/classification/tfgeometry1d.h
View file @
42f4ff45
...
...
@@ -29,6 +29,8 @@
#include
"tgt/vector.h"
#include
<vector>
#include
"core/coreapi.h"
namespace
tgt
{
class
Texture
;
}
...
...
@@ -40,9 +42,9 @@ namespace campvis {
* Defines a single shape for the GeometryTransferFunction class.
* TFGeometry1D is defined by a sorted list of KeyPoints, each having a position and a color.
*/
class
TFGeometry1D
{
class
CAMPVIS_CORE_API
TFGeometry1D
{
public:
struct
KeyPoint
{
struct
CAMPVIS_CORE_API
KeyPoint
{
explicit
KeyPoint
(
float
position
,
const
tgt
::
col4
&
color
)
:
_position
(
position
)
,
_color
(
color
)
...
...
@@ -151,7 +153,7 @@ namespace campvis {
* \param right RightKeyPoint to compare
* \return left._position < right._position
*/
bool
operator
<
(
const
TFGeometry1D
::
KeyPoint
&
left
,
const
TFGeometry1D
::
KeyPoint
&
right
);
CAMPVIS_CORE_API
bool
operator
<
(
const
TFGeometry1D
::
KeyPoint
&
left
,
const
TFGeometry1D
::
KeyPoint
&
right
);
}
...
...
core/classification/tfgeometry2d.h
View file @
42f4ff45
...
...
@@ -29,6 +29,8 @@
#include
"tgt/vector.h"
#include
<vector>
#include
"core/coreapi.h"
namespace
tgt
{
class
Texture
;
}
...
...
@@ -39,9 +41,9 @@ namespace campvis {
* Defines a single shape for the GeometryTransferFunction class.
* TFGeometry2D is defined by a sorted list of KeyPoints, each having a position and a color.
*/
class
TFGeometry2D
{
class
CAMPVIS_CORE_API
TFGeometry2D
{
public:
struct
KeyPoint
{
struct
CAMPVIS_CORE_API
KeyPoint
{
explicit
KeyPoint
(
const
tgt
::
vec2
&
position
,
const
tgt
::
col4
&
color
)
:
_position
(
position
)
,
_color
(
color
)
...
...
core/coreapi.h
0 → 100644
View file @
42f4ff45
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2013, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#ifndef CAMPVIS_COREAPI_H__
#define CAMPVIS_COREAPI_H__
#include
"sigslot/sigslot.h"
#ifdef CAMPVIS_DYNAMIC_LIBS
#ifdef CAMPVIS_CORE_BUILD_DLL
// building library -> export symbols
#ifdef WIN32
#define CAMPVIS_CORE_API __declspec(dllexport)
#else
#define CAMPVIS_CORE_API
#endif
#else
// including library -> import symbols
#ifdef WIN32
#define CAMPVIS_CORE_API __declspec(dllimport)
#else
#define CAMPVIS_CORE_API
#endif
#endif
#ifdef DLL_TEMPLATE_INST
// declare and instantiate sigslot templates for symbol ex-/import
class
CAMPVIS_CORE_API
sigslot
::
SIGSLOT_DEFAULT_MT_POLICY
;
template
class
CAMPVIS_CORE_API
sigslot
::
has_slots
<
sigslot
::
SIGSLOT_DEFAULT_MT_POLICY
>;
#endif
#else
// building/including static library -> do nothing
#define CAMPVIS_CORE_API
#endif
#endif // CAMPVIS_COREAPI_H__
core/datastructures/abstractdata.h
View file @
42f4ff45
...
...
@@ -31,6 +31,8 @@
#define ABSTRACTDATA_H__
#include
"tgt/bounds.h"
#include
"core/coreapi.h"
#include
"core/datastructures/scopedtypeddata.h"
// not directly needed here but by many classes including AbstractData
#include
"core/tools/referencecounted.h"
...
...
@@ -39,7 +41,7 @@ namespace campvis {
/**
* Interface class for data which can compute their bounds in world coordinates.
*/
class
IHasWorldBounds
{
class
CAMPVIS_CORE_API
IHasWorldBounds
{
public:
/// Default empty constructor
IHasWorldBounds
()
{};
...
...
@@ -60,7 +62,7 @@ namespace campvis {
*
* \todo
*/
class
AbstractData
:
public
ReferenceCounted
{
class
CAMPVIS_CORE_API
AbstractData
:
public
ReferenceCounted
{
public:
/**
* Constructor, simply calles ReferenceCounted ctor.
...
...
core/datastructures/abstractimagerepresentation.cpp
View file @
42f4ff45
...
...
@@ -34,6 +34,10 @@ namespace campvis {
tgtAssert
(
parent
!=
0
,
"Parent ImageData must not be 0!"
);
}
AbstractImageRepresentation
::
AbstractImageRepresentation
(
const
AbstractImageRepresentation
&
rhs
)
{
}
AbstractImageRepresentation
::~
AbstractImageRepresentation
()
{
}
...
...
@@ -57,5 +61,9 @@ namespace campvis {
const_cast
<
ImageData
*>
(
_parent
)
->
addRepresentation
(
this
);
}
AbstractImageRepresentation
&
AbstractImageRepresentation
::
operator
=
(
const
AbstractImageRepresentation
&
rhs
)
{
return
*
this
;
}
}
\ No newline at end of file
core/datastructures/abstractimagerepresentation.h
View file @
42f4ff45
...
...
@@ -27,6 +27,8 @@
#include
"tgt/bounds.h"
#include
"tgt/vector.h"
#include
"core/coreapi.h"
#include
"core/datastructures/abstractdata.h"
namespace
campvis
{
...
...
@@ -38,7 +40,7 @@ namespace campvis {
* the semantically same image but have their data at different locations (e.g. disk,
* RAM, OpenGL texture, ...)
*/
class
AbstractImageRepresentation
{
class
CAMPVIS_CORE_API
AbstractImageRepresentation
{
public:
/**
* Creates a new abstract representation for the image \a parent.
...
...
@@ -111,13 +113,14 @@ namespace campvis {
*/
void
addToParent
()
const
;
const
ImageData
*
_parent
;
///< Image this representation represents, must not be 0.
private:
/// Not copy-constructable
AbstractImageRepresentation
(
const
AbstractImageRepresentation
&
rhs
);
/// Not assignable
AbstractImageRepresentation
&
operator
=
(
const
AbstractImageRepresentation
&
rhs
);
const
ImageData
*
_parent
;
///< Image this representation represents, must not be 0.
static
const
std
::
string
loggerCat_
;
};
}
...
...
core/datastructures/datacontainer.h
View file @
42f4ff45
...
...
@@ -28,6 +28,8 @@
#include
"sigslot/sigslot.h"
#include
<tbb/concurrent_unordered_map.h>
#include
<tbb/spin_mutex.h>
#include
"core/coreapi.h"
#include
"core/datastructures/datahandle.h"
#include
<string>
...
...
@@ -50,7 +52,7 @@ namespace campvis {
*
* \todo Check thread-safety
*/
class
DataContainer
{
class
CAMPVIS_CORE_API
DataContainer
{
public:
/**
* Creates a new empty DataContainer
...
...
core/datastructures/datahandle.h
View file @
42f4ff45
...
...
@@ -27,6 +27,8 @@
#include
<ctime>
#include
"core/coreapi.h"
namespace
campvis
{
class
AbstractData
;
...
...
@@ -45,7 +47,7 @@ namespace campvis {
* with its reference counting!
* \note Reference counting implementation inspired from Scott Meyers: More Effective C++, Item 29
*/
class
DataHandle
{
class
CAMPVIS_CORE_API
DataHandle
{
public:
/**
* Creates a new DataHandle for the given data.
...
...
core/datastructures/facegeometry.h
View file @
42f4ff45
...
...
@@ -44,7 +44,7 @@ namespace campvis {
* \note This class expects all vertices lying within one plane. Everything other that that
* leads to undefined behavior.
*/
class
FaceGeometry
:
public
GeometryData
{
class
CAMPVIS_CORE_API
FaceGeometry
:
public
GeometryData
{
public:
/**
* Creates a new empty FaceGeometry.
...
...
core/datastructures/genericabstractimagerepresentation.h
View file @
42f4ff45
...
...
@@ -41,7 +41,7 @@ namespace campvis {
* \tparam T Base class of the ImageRepresentation to get.
*/
template
<
typename
T
>
class
GenericAbstractImageRepresentation
:
public
AbstractImageRepresentation
{
class
GenericAbstractImageRepresentation
:
public
AbstractImageRepresentation
{
public:
struct
ScopedRepresentation
{
/**
...
...
core/datastructures/geometrydata.h
View file @
42f4ff45
...
...
@@ -50,7 +50,7 @@ namespace campvis {
* - Vertex normals: Vertex attribute 3
*
*/
class
GeometryData
:
public
AbstractData
,
public
IHasWorldBounds
{
class
CAMPVIS_CORE_API
GeometryData
:
public
AbstractData
,
public
IHasWorldBounds
{
public:
/**
* Constructor
...
...
core/datastructures/geometrydatafactory.h
View file @
42f4ff45
...
...
@@ -37,7 +37,7 @@
namespace
campvis
{
class
GeometryDataFactory
{
class
CAMPVIS_CORE_API
GeometryDataFactory
{
public:
/**
* Creates a FaceGeometry building an axis-aligned rectangle face in the YX plane (quad)
...
...
core/datastructures/imagedata.h
View file @
42f4ff45
...
...
@@ -28,6 +28,8 @@
#include
<tbb/concurrent_vector.h>
#include
"tgt/logmanager.h"
#include
"tgt/vector.h"
#include
"core/coreapi.h"
#include
"core/datastructures/abstractdata.h"
#include
"core/datastructures/abstractimagerepresentation.h"
#include
"core/datastructures/imagemappinginformation.h"
...
...
@@ -45,7 +47,7 @@ namespace campvis {
*
* \todo
*/
class
ImageData
:
public
AbstractData
,
public
IHasWorldBounds
{
class
CAMPVIS_CORE_API
ImageData
:
public
AbstractData
,
public
IHasWorldBounds
{
// friend so that it can add itself as representation
friend
class
AbstractImageRepresentation
;
...
...
@@ -231,13 +233,13 @@ namespace campvis {
}
template
<
>
const
campvis
::
ImageRepresentationLocal
*
campvis
::
ImageData
::
getRepresentation
<
ImageRepresentationLocal
>
(
bool
performConversion
)
const
;
CAMPVIS_CORE_API
const
campvis
::
ImageRepresentationLocal
*
campvis
::
ImageData
::
getRepresentation
<
ImageRepresentationLocal
>
(
bool
performConversion
)
const
;
#ifdef CAMPVIS_HAS_MODULE_ITK
class
AbstractImageRepresentationItk
;
template
<
>
const
campvis
::
AbstractImageRepresentationItk
*
campvis
::
ImageData
::
getRepresentation
<
AbstractImageRepresentationItk
>
(
bool
performConversion
)
const
;
CAMPVIS_CORE_API
const
campvis
::
AbstractImageRepresentationItk
*
campvis
::
ImageData
::
getRepresentation
<
AbstractImageRepresentationItk
>
(
bool
performConversion
)
const
;
#endif
template
<
typename
T
>
...
...
core/datastructures/imagemappinginformation.h
View file @
42f4ff45
...
...
@@ -27,6 +27,8 @@
#include
"tgt/matrix.h"
#include
"tgt/vector.h"
#include
"core/coreapi.h"
#include
"core/tools/mapping.h"
namespace
campvis
{
...
...
@@ -37,7 +39,7 @@ namespace campvis {
* \todo Make a full list of fields that belong in this class. Then check
* which of them belong together and which are derived measures.
*/
class
ImageMappingInformation
{
class
CAMPVIS_CORE_API
ImageMappingInformation
{
public:
/**
* Creates a new default ImageMappingInformation.
...
...
Prev
1
2
3
4
Next
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