Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
DicomROIContour Class Reference

#include <Doxymodules_medical.h>

Public Member Functions

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

Private Attributes

std::vector< OFString > theImageIUIDs
 
OFString theGeomType
 
std::vector< G4ThreeVector > thePoints
 
std::vector< G4ThreeVector > theDirections
 

Detailed Description

Definition at line 55 of file Doxymodules_medical.h.

Constructor & Destructor Documentation

◆ DicomROIContour()

DicomROIContour::DicomROIContour ( )

Definition at line 29 of file DicomROIContour.cc.

30{
31}

◆ ~DicomROIContour()

DicomROIContour::~DicomROIContour ( )
inline

Definition at line 38 of file DicomROIContour.hh.

38{};

Member Function Documentation

◆ AddImageIUID()

void DicomROIContour::AddImageIUID ( OFString  ima)
inline

Definition at line 41 of file DicomROIContour.hh.

41 {
42 theImageIUIDs.push_back(ima);
43 }
std::vector< OFString > theImageIUIDs

◆ GetGeomType()

OFString DicomROIContour::GetGeomType ( ) const
inline

Definition at line 44 of file DicomROIContour.hh.

44 {
45 return theGeomType;
46 }

◆ SetGeomType()

void DicomROIContour::SetGeomType ( OFString  gt)
inline

Definition at line 47 of file DicomROIContour.hh.

47 {
48 theGeomType = gt;
49 }

◆ GetPoints()

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

Definition at line 50 of file DicomROIContour.hh.

50 {
51 return thePoints;
52 }
std::vector< G4ThreeVector > thePoints

◆ GetDirections()

std::vector< G4ThreeVector > DicomROIContour::GetDirections ( )
inline

Definition at line 53 of file DicomROIContour.hh.

53 {
54 return theDirections;
55 }
std::vector< G4ThreeVector > theDirections

◆ GetZ()

G4double DicomROIContour::GetZ ( )

Definition at line 48 of file DicomROIContour.cc.

49{
50 if( thePoints.size() == 0 ) {
51 G4Exception("DicomROIContour::GetZ",
52 "DRC001",
53 FatalException,
54 "No Point in contour");
55 Print(G4cout);
56 return DBL_MAX;
57 }
58 return thePoints[0].z();
59}
void Print(std::ostream &out)

◆ SetData()

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}

◆ AddPoints()

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}

◆ Print()

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}

Member Data Documentation

◆ theImageIUIDs

std::vector<OFString> DicomROIContour::theImageIUIDs
private

Definition at line 64 of file DicomROIContour.hh.

◆ theGeomType

OFString DicomROIContour::theGeomType
private

Definition at line 66 of file DicomROIContour.hh.

◆ thePoints

std::vector<G4ThreeVector> DicomROIContour::thePoints
private

Definition at line 67 of file DicomROIContour.hh.

◆ theDirections

std::vector<G4ThreeVector> DicomROIContour::theDirections
private

Definition at line 68 of file DicomROIContour.hh.


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

Applications | User Support | Publications | Collaboration