Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
examples
extended
medical
DICOM
include
DicomPhantomZSliceHeader.hh
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
28
//
29
30
#ifndef DicomPhantomZSliceHeader_h
31
#define DicomPhantomZSliceHeader_h 1
32
33
#include "
globals.hh
"
34
class
G4material;
35
#include <fstream>
36
#include <vector>
37
38
//*******************************************************
46
//*******************************************************
47
48
class
DicomPhantomZSliceHeader
49
{
50
public
:
51
52
DicomPhantomZSliceHeader
(
const
DicomPhantomZSliceHeader
& rhs );
53
// build object copying an existing one (except Z dimensions)
54
55
DicomPhantomZSliceHeader
( std::ifstream&
fin
);
56
// build object reading data from a file
57
58
~DicomPhantomZSliceHeader
(){};
59
60
// Get and set methods
61
G4int
GetNoVoxelX
()
const
{
return
fNoVoxelX; };
62
G4int
GetNoVoxelY
()
const
{
return
fNoVoxelY; };
63
G4int
GetNoVoxelZ
()
const
{
return
fNoVoxelZ; };
64
G4int
GetNoVoxels
()
const
{
return
fNoVoxelX*fNoVoxelY*fNoVoxelZ; };
65
66
G4double
GetMinX
()
const
{
return
fMinX; };
67
G4double
GetMinY
()
const
{
return
fMinY; };
68
G4double
GetMinZ
()
const
{
return
fMinZ; };
69
G4double
GetMaxX
()
const
{
return
fMaxX; };
70
G4double
GetMaxY
()
const
{
return
fMaxY; };
71
G4double
GetMaxZ
()
const
{
return
fMaxZ; };
72
73
G4double
GetVoxelHalfX
()
const
{
return
(fMaxX-fMinX)/fNoVoxelX/2.; };
74
G4double
GetVoxelHalfY
()
const
{
return
(fMaxY-fMinY)/fNoVoxelY/2.; };
75
G4double
GetVoxelHalfZ
()
const
{
return
(fMaxZ-fMinZ)/fNoVoxelZ/2.; };
76
77
std::vector<G4String>
GetMaterialNames
()
const
{
return
fMaterialNames; };
78
79
80
void
SetNoVoxelX
(
const
G4int
val) { fNoVoxelX = val; }
81
void
SetNoVoxelY
(
const
G4int
val) { fNoVoxelY = val; }
82
void
SetNoVoxelZ
(
const
G4int
val) { fNoVoxelZ = val; }
83
84
void
SetMinX
(
const
G4double
val) { fMinX = val; };
85
void
SetMaxX
(
const
G4double
val) { fMaxX = val; };
86
void
SetMinY
(
const
G4double
val) { fMinY = val; };
87
void
SetMaxY
(
const
G4double
val) { fMaxY = val; };
88
void
SetMinZ
(
const
G4double
val) { fMinZ = val; };
89
void
SetMaxZ
(
const
G4double
val) { fMaxZ = val; };
90
91
void
SetMaterialNames
(std::vector<G4String>& mn ){ fMaterialNames = mn; }
92
93
94
void
operator+=
(
const
DicomPhantomZSliceHeader
& rhs );
95
DicomPhantomZSliceHeader
operator+
(
const
DicomPhantomZSliceHeader
& rhs );
96
// add two slices that have the same dimensions, merging them in Z
97
98
private
:
99
G4bool
CheckMaterialExists(
const
G4String
& mateName );
100
// check that material read exists as a G4Material
101
102
private
:
103
G4int
fNoVoxelX, fNoVoxelY, fNoVoxelZ;
// number of voxels in each dimensions
104
G4double
fMinX,fMinY,fMinZ;
// minimum extension of voxels (position of wall)
105
G4double
fMaxX,fMaxY,fMaxZ;
// maximum extension of voxels (position of wall)
106
107
std::vector<G4String> fMaterialNames;
// list of material names
108
109
};
110
111
#endif
Generated on Sat May 25 2013 14:32:57 for Geant4 by
1.8.4