Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DicomROIContour Class Reference

#include <DicomROIContour.hh>

Public Member Functions

 DicomROIContour ()
 
 ~DicomROIContour ()
 
void AddImageIUID (OFString ima)
 
OFString GetGeomType () const
 
void SetGeomType (OFString gt)
 
std::vector< G4ThreeVectorGetPoints () const
 
std::vector< G4ThreeVectorGetDirections ()
 
G4double GetZ ()
 
void SetData (std::vector< G4ThreeVector > data)
 
void AddPoints (std::vector< G4ThreeVector > points)
 
void Print (std::ostream &out)
 

Detailed Description

Definition at line 34 of file DicomROIContour.hh.

Constructor & Destructor Documentation

DicomROIContour::DicomROIContour ( )

Definition at line 29 of file DicomROIContour.cc.

30 {
31 }
DicomROIContour::~DicomROIContour ( )
inline

Definition at line 38 of file DicomROIContour.hh.

38 {};

Member Function Documentation

void DicomROIContour::AddImageIUID ( OFString  ima)
inline

Definition at line 41 of file DicomROIContour.hh.

41  {
42  theImageIUIDs.push_back(ima);
43  }

Here is the caller graph for this function:

void DicomROIContour::AddPoints ( std::vector< G4ThreeVector points)

Definition at line 62 of file DicomROIContour.cc.

63 {
64  points.push_back( points[0] );
65  size_t npold = thePoints.size();
66  for( size_t ii = 0; ii < points.size(); ii++ ) {
67  thePoints.push_back( points[ii] );
68  }
69 
70  for( size_t ii = npold+1; ii < thePoints.size(); ii++ ){
71  theDirections.push_back( thePoints[ii] - thePoints[ii-1] );
72  }
73  theDirections.push_back( thePoints[npold] - thePoints[thePoints.size()-1] );
74 
75 }
std::vector<G4ThreeVector> DicomROIContour::GetDirections ( )
inline

Definition at line 53 of file DicomROIContour.hh.

53  {
54  return theDirections;
55  }

Here is the caller graph for this function:

OFString DicomROIContour::GetGeomType ( ) const
inline

Definition at line 44 of file DicomROIContour.hh.

44  {
45  return theGeomType;
46  }

Here is the caller graph for this function:

std::vector<G4ThreeVector> DicomROIContour::GetPoints ( ) const
inline

Definition at line 50 of file DicomROIContour.hh.

50  {
51  return thePoints;
52  }

Here is the caller graph for this function:

G4double DicomROIContour::GetZ ( )

Definition at line 48 of file DicomROIContour.cc.

49 {
50  if( thePoints.size() == 0 ) {
51  G4Exception("DicomROIContour::GetZ",
52  "DRC001",
54  "No Point in contour");
55  Print(G4cout);
56  return DBL_MAX;
57  }
58  return thePoints[0].z();
59 }
void Print(std::ostream &out)
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define DBL_MAX
Definition: templates.hh:83

Here is the call graph for this function:

Here is the caller graph for this function:

void DicomROIContour::Print ( std::ostream &  out)

Definition at line 78 of file DicomROIContour.cc.

79 {
80 
81  out << this << "@@@ NUMBER OF ContourImageSequences " << theImageIUIDs.size() << G4endl;
82  for( size_t ii = 0; ii < theImageIUIDs.size(); ii++ ) {
83  out << "ContourImageSequence I= " << theImageIUIDs[ii] << G4endl;
84  }
85  out << "@@@ GeomType " << theGeomType << " NPOINTS " << thePoints.size() << G4endl;
86  for( size_t ii = 0; ii < thePoints.size(); ii++ ) {
87  out << "(" << thePoints[ii].x()<< "," << thePoints[ii].y()<< "," << thePoints[ii].z()
88  << ")" << G4endl;
89  }
90 
91 }
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:

void DicomROIContour::SetData ( std::vector< G4ThreeVector data)

Definition at line 34 of file DicomROIContour.cc.

35 {
36  thePoints = data;
37  if( theGeomType == "CLOSED_PLANAR" ){
38  //add a last point to close the circle
39  thePoints.push_back( thePoints[0] );
40  for( size_t ii = 1; ii < thePoints.size(); ii++ ){
41  theDirections.push_back( thePoints[ii] - thePoints[ii-1] );
42  }
43  theDirections.push_back( thePoints[0] - thePoints[thePoints.size()-1] ); // (0,0)
44  }
45 }
const XML_Char const XML_Char * data
Definition: expat.h:268

Here is the caller graph for this function:

void DicomROIContour::SetGeomType ( OFString  gt)
inline

Definition at line 47 of file DicomROIContour.hh.

47  {
48  theGeomType = gt;
49  }

Here is the caller graph for this function:


The documentation for this class was generated from the following files: