DGtalTools
1.5.beta
visualisation
specificClasses
Viewer3DImage.h
1
2
#if defined(Viewer3DImage_RECURSES)
3
#error Recursive header files inclusion detected in Viewer3DImage.h
4
#else
// defined(Viewer3DImage_RECURSES)
6
#define Viewer3DImage_RECURSES
7
8
9
#if !defined Viewer3DImage_h
10
#define Viewer3DImage_h
15
#include "DGtal/helpers/StdDefs.h"
16
#include "DGtal/io/viewers/Viewer3D.h"
17
#include "DGtal/io/Display3D.h"
18
#include "DGtal/images/ImageSelector.h"
19
#include "DGtal/images/ImageContainerBySTLVector.h"
20
#include "DGtal/images/ConstImageAdapter.h"
21
22
template
<
typename
Space = DGtal::Z3i::Space,
typename
KSpace = DGtal::Z3i::KSpace>
23
class
Viewer3DImage
:
public
DGtal::Viewer3D
<Space, KSpace>
24
{
25
26
typedef
DGtal::ImageContainerBySTLVector<DGtal::Z3i::Domain, unsigned char>
Image3D
;
27
typedef
DGtal::ImageContainerBySTLVector<DGtal::Z2i::Domain, unsigned char>
Image2D
;
28
29
typedef
DGtal::ConstImageAdapter<Image3D, Image2D::Domain, DGtal::functors::Projector< DGtal::Z3i::Space>
,
30
Image3D::Value
,
DGtal::functors::Identity
>
SliceImageAdapter
;
31
32
typedef
DGtal::ConstImageAdapter<Image3D, DGtal::Z2i::Domain, DGtal::functors::SliceRotator2D< DGtal::Z3i::Domain >
,
33
Image3D::Value
,
DGtal::functors::Identity
>
MyRotatorSliceImageAdapter
;
34
35
36
37
public
:
38
enum
ModeVisu
{
BoundingBox
,
InterGrid
,
Grid
,
Empty
};
39
40
Viewer3DImage
(
ModeVisu
aMode=
BoundingBox
) :
DGtal
::
Viewer3D
<Space,
KSpace
>(),
myImageOrigin
(
DGtal
::Z3i::
Point
(0,0,0)){
41
mySliceXPos
=0;
42
mySliceYPos
=0;
43
mySliceZPos
=0;
44
myTotalAngleRotationX
=0.0;
45
myTotalAngleRotationY
=0.0;
46
myTotalAngleRotationZ
=0.0;
47
myAngleRotation
=0.0;
48
myCurrentSliceDim
=0;
49
myMode
=aMode;
50
myDisplayingInfo
=
true
;
51
}
52
53
54
Viewer3DImage
(
Image3D
* an3DImage){
55
my3dImage
= an3DImage;
56
Viewer3DImage
();
57
}
58
59
void
setVolImage
(
Image3D
* an3DImage);
60
61
62
63
64
protected
:
65
virtual
QString
helpString
()
const
;
66
virtual
void
keyPressEvent
( QKeyEvent *e );
67
virtual
void
init
();
68
Image3D
*
my3dImage
;
69
float
myScaleX
;
70
float
myScaleY
;
71
float
myScaleZ
;
72
int
mySliceXPos
;
73
int
mySliceYPos
;
74
int
mySliceZPos
;
75
int
myCurrentSliceDim
;
76
double
myAngleRotation
;
77
double
myTotalAngleRotationX
;
78
double
myTotalAngleRotationY
;
79
double
myTotalAngleRotationZ
;
80
bool
myDisplayingInfo
;
81
DGtal::Z3i::Point
myImageOrigin
;
82
ModeVisu
myMode
;
83
};
84
85
86
#endif
// undefined viewer3dimage
87
88
#undef Viewer3DImage_RECURSES
89
#endif
// else defined(Viewer3DImage_RECURSES)
90
DGtal::ConstImageAdapter
DGtal::ImageContainerBySTLVector
DGtal::ImageContainerBySTLVector::Value
TValue Value
Point
typename Self::Point Point
DGtal::KhalimskySpaceND
PointVector< dim, Integer >
DGtal::Viewer3D< DGtal::Z3i::Space, DGtal::Z3i::KSpace >::Viewer3D
Viewer3D()
Viewer3DImage
Definition:
Viewer3DImage.h:24
Viewer3DImage::keyPressEvent
virtual void keyPressEvent(QKeyEvent *e)
Definition:
Viewer3DImage.cpp:154
Viewer3DImage::Viewer3DImage
Viewer3DImage(Image3D *an3DImage)
Definition:
Viewer3DImage.h:54
Viewer3DImage::MyRotatorSliceImageAdapter
DGtal::ConstImageAdapter< Image3D, DGtal::Z2i::Domain, DGtal::functors::SliceRotator2D< DGtal::Z3i::Domain >, Image3D::Value, DGtal::functors::Identity > MyRotatorSliceImageAdapter
Definition:
Viewer3DImage.h:33
Viewer3DImage::mySliceZPos
int mySliceZPos
Definition:
Viewer3DImage.h:74
Viewer3DImage::SliceImageAdapter
DGtal::ConstImageAdapter< Image3D, Image2D::Domain, DGtal::functors::Projector< DGtal::Z3i::Space >, Image3D::Value, DGtal::functors::Identity > SliceImageAdapter
Definition:
Viewer3DImage.h:30
Viewer3DImage::init
virtual void init()
Definition:
Viewer3DImage.cpp:40
Viewer3DImage::myMode
ModeVisu myMode
Definition:
Viewer3DImage.h:82
Viewer3DImage::myCurrentSliceDim
int myCurrentSliceDim
Definition:
Viewer3DImage.h:75
Viewer3DImage::my3dImage
Image3D * my3dImage
Definition:
Viewer3DImage.h:68
Viewer3DImage::myAngleRotation
double myAngleRotation
Definition:
Viewer3DImage.h:76
Viewer3DImage::myTotalAngleRotationY
double myTotalAngleRotationY
Definition:
Viewer3DImage.h:78
Viewer3DImage::myTotalAngleRotationZ
double myTotalAngleRotationZ
Definition:
Viewer3DImage.h:79
Viewer3DImage::myScaleX
float myScaleX
Definition:
Viewer3DImage.h:69
Viewer3DImage::Image3D
DGtal::ImageContainerBySTLVector< DGtal::Z3i::Domain, unsigned char > Image3D
Definition:
Viewer3DImage.h:26
Viewer3DImage::helpString
virtual QString helpString() const
Definition:
Viewer3DImage.cpp:128
Viewer3DImage::Image2D
DGtal::ImageContainerBySTLVector< DGtal::Z2i::Domain, unsigned char > Image2D
Definition:
Viewer3DImage.h:27
Viewer3DImage::Viewer3DImage
Viewer3DImage(ModeVisu aMode=BoundingBox)
Definition:
Viewer3DImage.h:40
Viewer3DImage::mySliceYPos
int mySliceYPos
Definition:
Viewer3DImage.h:73
Viewer3DImage::myScaleZ
float myScaleZ
Definition:
Viewer3DImage.h:71
Viewer3DImage::myTotalAngleRotationX
double myTotalAngleRotationX
Definition:
Viewer3DImage.h:77
Viewer3DImage::myScaleY
float myScaleY
Definition:
Viewer3DImage.h:70
Viewer3DImage::myDisplayingInfo
bool myDisplayingInfo
Definition:
Viewer3DImage.h:80
Viewer3DImage::setVolImage
void setVolImage(Image3D *an3DImage)
Definition:
Viewer3DImage.cpp:55
Viewer3DImage::myImageOrigin
DGtal::Z3i::Point myImageOrigin
Definition:
Viewer3DImage.h:81
Viewer3DImage::mySliceXPos
int mySliceXPos
Definition:
Viewer3DImage.h:72
Viewer3DImage::ModeVisu
ModeVisu
Definition:
Viewer3DImage.h:38
Viewer3DImage::BoundingBox
@ BoundingBox
Definition:
Viewer3DImage.h:38
Viewer3DImage::Empty
@ Empty
Definition:
Viewer3DImage.h:38
Viewer3DImage::InterGrid
@ InterGrid
Definition:
Viewer3DImage.h:38
Viewer3DImage::Grid
@ Grid
Definition:
Viewer3DImage.h:38
DGtal
DGtal::Viewer3D
DGtal::functors::Identity
Companion project associated to
DGtal
; Generated on Mon Aug 26 2024 21:31:31 for DGtalTools by
1.9.1