creaContours_lib
OsirixParser Class Reference

#include <OsirixParser.h>

Public Member Functions

 OsirixParser (std::string xsdfile="", double *spacing=NULL, int *extent=NULL)
 
 ~OsirixParser ()
 
int ParseFile (const char *xmlfile)
 
std::string getErrorLine ()
 
std::string getContoursFileName ()
 
const std::map< int, vector
< vector< double > > > & 
getContoursMapMM ()
 
const std::map< int, vector
< vector< double > > > & 
getContoursMapPX ()
 
const std::map< int,
std::string > & 
getContoursNameMM ()
 
const std::map< int,
std::string > & 
getContoursNamePX ()
 

Private Types

typedef vector< vector< double > > vectorXYZ
 

Private Member Functions

void saveCreaContoursFormat ()
 
void writeHeader (FILE *pFile)
 
void writeContours (FILE *pFile)
 
void writeContoursStatic (FILE *pFile)
 
void setErrorLine (DOMNodeList *list)
 
void getUserData (DOMElement *element)
 
void getData (DOMNodeList *list, std::vector< std::string > &vect, std::string tagname)
 
DOMNode * getLastNode (DOMNodeList *list)
 
void parseOSIRIX_DICT (DOMNodeList *list)
 
void parseOSIRIX_POINT_MM (DOMNodeList *list)
 
void parseOSIRIX_POINT_PX (DOMNodeList *list)
 

Private Attributes

std::string schema
 
std::string errorline
 
int _imageindex
 
std::string _roiname
 
const char * OSIRIX_DICT
 
const char * OSIRIX_KEY
 
const char * OSIRIX_IMAGES
 
const char * OSIRIX_ARRAY
 
const char * OSIRIX_IMAGEINDEX
 
const char * OSIRIX_INTEGER
 
const char * OSIRIX_NUMBEROFROIS
 
const char * OSIRIX_ROIS
 
const char * OSIRIX_POINT_MM
 
const char * OSIRIX_POINT_PX
 
const char * OSIRIX_STRING
 
const char * OSIRIX_NAME
 
const char * CREACONTOUR
 
const char * CREACONTOUR_VERSION
 
const char * CREACONTOUR_IMAGEDIMENSIONS
 
const char * CREACONTOUR_IMAGESPACING
 
const char * CREACONTOUR_NUMBEROFCONTOURS
 
const char * CREACONTOUR_INSTANT
 
const char * CREACONTOUR_TYPEMODEL
 
const char * CREACONTOUR_NUMBEROFCONTROLPOINTS
 
const char * CREACONTOUR_TYPEVIEW
 
const char * CREACONTOUR_NUMBEROFCONTOURSSTATIC
 
std::string TEMPIMPORTOSIRIXFILE
 
double _spacing [3]
 
int _extent [6]
 
std::map< int, vectorXYZcontoursmapMM
 
std::map< int, vectorXYZcontoursmapPX
 
std::map< int, std::string > contoursnameMM
 
std::map< int, std::string > contoursnamePX
 

Detailed Description

Definition at line 64 of file OsirixParser.h.

Member Typedef Documentation

typedef vector< vector<double> > OsirixParser::vectorXYZ
private

Definition at line 143 of file OsirixParser.h.

Constructor & Destructor Documentation

OsirixParser::OsirixParser ( std::string  xsdfile = "",
double *  spacing = NULL,
int *  extent = NULL 
)

Constructor for the parser, with the information of the pixel spacing and image dimensions

Definition at line 34 of file OsirixParser.cxx.

References _extent, _spacing, CREACONTOUR, CREACONTOUR_IMAGEDIMENSIONS, CREACONTOUR_IMAGESPACING, CREACONTOUR_INSTANT, CREACONTOUR_NUMBEROFCONTOURS, CREACONTOUR_NUMBEROFCONTOURSSTATIC, CREACONTOUR_NUMBEROFCONTROLPOINTS, CREACONTOUR_TYPEMODEL, CREACONTOUR_TYPEVIEW, CREACONTOUR_VERSION, OSIRIX_ARRAY, OSIRIX_DICT, OSIRIX_IMAGEINDEX, OSIRIX_IMAGES, OSIRIX_INTEGER, OSIRIX_KEY, OSIRIX_NAME, OSIRIX_NUMBEROFROIS, OSIRIX_POINT_MM, OSIRIX_POINT_PX, OSIRIX_ROIS, OSIRIX_STRING, schema, and TEMPIMPORTOSIRIXFILE.

Referenced by ParseFile().

35 {
36  schema=xsdfile;
37 
38  OSIRIX_DICT = "dict";
39  OSIRIX_KEY = "key";
40  OSIRIX_IMAGES = "Images";
41  OSIRIX_ARRAY = "array";
42  OSIRIX_IMAGEINDEX = "ImageIndex";
43  OSIRIX_INTEGER = "integer";
44  OSIRIX_NUMBEROFROIS = "NumberOfROIs";
45  OSIRIX_ROIS = "ROIs";
46  OSIRIX_POINT_MM = "Point_mm";
47  OSIRIX_POINT_PX = "Point_px";
48  OSIRIX_STRING = "string";
49  OSIRIX_NAME = "Name";
50 
51  if(spacing != NULL){
52  _spacing[0] = spacing[0];
53  _spacing[1] = spacing[1];
54  _spacing[2] = spacing[2];
55  }else{
56  _spacing[0] = 1;
57  _spacing[1] = 1;
58  _spacing[2] = 1;
59  }
60 
61  if(extent != NULL){
62  _extent[0] = extent[0];
63  _extent[1] = extent[1];
64  _extent[2] = extent[2];
65  _extent[3] = extent[3];
66  _extent[4] = extent[4];
67  _extent[5] = extent[5];
68 
69  }else{
70  _extent[0] = 1;
71  _extent[1] = 1;
72  _extent[2] = 1;
73  _extent[3] = 1;
74  _extent[4] = 1;
75  _extent[5] = 1;
76  }
77 
78 
79  /*HEADER*/
80  CREACONTOUR = "--CreaContour--";
81  CREACONTOUR_VERSION = "Version 1.0.2";
82  CREACONTOUR_IMAGEDIMENSIONS = "ImageDimensions";
83  CREACONTOUR_IMAGESPACING = "ImageSpacing";
84  CREACONTOUR_NUMBEROFCONTOURS = "NumberOfContours";
85  /*FOR EACH CONTOUR*/
86  CREACONTOUR_INSTANT = "Instant";
87  CREACONTOUR_TYPEMODEL = "TypeModel";
88  CREACONTOUR_NUMBEROFCONTROLPOINTS = "NumberOfControlPoints";
89  CREACONTOUR_TYPEVIEW = "TypeView";
90  /*STATICCONTOURS*/
91  CREACONTOUR_NUMBEROFCONTOURSSTATIC = "NumberOfContoursStatic";
92 
94 
95 #ifdef WIN32
96 
97  char currentPath[_MAX_PATH];
98  GetModuleFileName(NULL, currentPath, _MAX_PATH);
99  TEMPIMPORTOSIRIXFILE = currentPath;
100 
101  TEMPIMPORTOSIRIXFILE = TEMPIMPORTOSIRIXFILE.substr(0,TEMPIMPORTOSIRIXFILE.find_last_of("\\"));
102 
103  TEMPIMPORTOSIRIXFILE.append("\\data\\TEMPIMPORTOSIRIXFILE.roi");
104 
105 #else
106  char * pPath;
107  pPath = getenv ("HOME");
108 
109  if(pPath){
110  TEMPIMPORTOSIRIXFILE.append(pPath);
111  }else{
112  TEMPIMPORTOSIRIXFILE.append(".");
113  }
114  TEMPIMPORTOSIRIXFILE.append("/.creaContourDataTemp/TEMPIMPORTOSIRIXFILE.roi");
115 #endif
116 
117 }

Here is the caller graph for this function:

OsirixParser::~OsirixParser ( )

Desctructor by defect

Definition at line 118 of file OsirixParser.cxx.

118  {
119 
120 }

Member Function Documentation

std::string OsirixParser::getContoursFileName ( )

Definition at line 488 of file OsirixParser.cxx.

References TEMPIMPORTOSIRIXFILE.

Referenced by KernelManagerContour::parseOsirixFile().

488  {
489  return TEMPIMPORTOSIRIXFILE;
490 }

Here is the caller graph for this function:

const std::map<int, vector< vector<double> > >& OsirixParser::getContoursMapMM ( )
inline

Definition at line 88 of file OsirixParser.h.

88  {
89  return contoursmapMM;
90  }
const std::map<int, vector< vector<double> > >& OsirixParser::getContoursMapPX ( )
inline

Definition at line 91 of file OsirixParser.h.

91  {
92  return contoursmapPX;
93  }
const std::map<int, std::string>& OsirixParser::getContoursNameMM ( )
inline

Definition at line 96 of file OsirixParser.h.

96  {
97  return contoursnameMM;
98  }
const std::map<int, std::string>& OsirixParser::getContoursNamePX ( )
inline

Definition at line 99 of file OsirixParser.h.

99  {
100  return contoursnamePX;
101  }
void OsirixParser::getData ( DOMNodeList *  list,
std::vector< std::string > &  vect,
std::string  tagname 
)
private

Definition at line 395 of file OsirixParser.cxx.

395  {
396 
397  for(int i = 0; i < (int)(list->getLength()); i++){
398  DOMNode* node = list->item(i);
399  if(tagname.compare(XMLString::transcode(node->getNodeName()))==0){
400  std::cout<<"NODENAME "<<XMLString::transcode(node->getTextContent())<<std::endl;
401  vect.push_back(XMLString::transcode(node->getTextContent()));
402  }
403 
404  }
405 }
std::string OsirixParser::getErrorLine ( )
DOMNode * OsirixParser::getLastNode ( DOMNodeList *  list)
private

Definition at line 222 of file OsirixParser.cxx.

222  {
223 
224 
225  DOMNode* node;
226  /*for(int i = list->getLength()-1; i >= 0 ;i--){
227 
228  node = list->item(i);
229 
230  if(node->getNodeType() == DOMNode::ELEMENT_NODE){
231  i = -1;
232  }
233 
234  }*/
235  node = list->item(list->getLength()-1);
236 
237 
238 
239  if(node->getChildNodes()->getLength()>0){
240  return getLastNode(node->getChildNodes());
241  }
242  return node;
243 
244 }
void OsirixParser::getUserData ( DOMElement *  element)
private

Definition at line 246 of file OsirixParser.cxx.

References OSIRIX_DICT, and parseOSIRIX_DICT().

Referenced by ParseFile().

246  {
247  parseOSIRIX_DICT(element->getElementsByTagName(XMLString::transcode(OSIRIX_DICT)));
248 }

Here is the call graph for this function:

Here is the caller graph for this function:

int OsirixParser::ParseFile ( const char *  xmlfile)

Definition at line 122 of file OsirixParser.cxx.

References errorline, getUserData(), OsirixParser(), saveCreaContoursFormat(), and schema.

122  {
123 
124  xercesc::DOMDocument *doc;
125 
126 
127  try {
128  XMLPlatformUtils::Initialize();
129  }
130  catch (const XMLException& toCatch) {
131  char* message = XMLString::transcode(toCatch.getMessage());
132  cout << "Error during initialization! :\n"
133  << message << "\n";
134  XMLString::release(&message);
135  return 1;
136  }
137 
138  XercesDOMParser* OsirixParser = new XercesDOMParser();
139 
140 
141  OsirixParser->setDoNamespaces(true);
142  OsirixParser->setDoSchema(true);
143  OsirixParser->setValidationScheme(XercesDOMParser::Val_Always );
144  OsirixParser->setExternalNoNamespaceSchemaLocation(XMLString::transcode(schema.c_str()));
145  OsirixParser->setValidationSchemaFullChecking(true);
146  OsirixParser->setValidationConstraintFatal(true);
147  OsirixParser->setExitOnFirstFatalError(true);
148 
149 
150  ErrorHandler* errHandler = (ErrorHandler*) new OsirixParserErrorHandler();
151 
152  OsirixParser->setErrorHandler(errHandler);
153 
154 
155  try {
156  OsirixParser->parse(xmlfile);
157 
158 
159  if(OsirixParser->getErrorCount() > 0){
160 
161  errorline = ((OsirixParserErrorHandler*)OsirixParser->getErrorHandler())->getErrorMsg();
162 
163 
164  delete OsirixParser;
165  delete errHandler;
166  return -2;
167  }
168 
169 
170 
171  }
172  catch (const XMLException& toCatch) {
173  char* message = XMLString::transcode(toCatch.getMessage());
174  cout << "Exception message is: \n"
175  << message << "\n";
176  XMLString::release(&message);
177  delete OsirixParser;
178  delete errHandler;
179  return -1;
180  }
181  catch (const DOMException& toCatch) {
182  char* message = XMLString::transcode(toCatch.msg);
183  cout << "Exception message is: \n"
184  << message << "\n";
185  XMLString::release(&message);
186  delete OsirixParser;
187  delete errHandler;
188  return -1;
189  }
190  catch (...) {
191  cout << "Unexpected Exception \n" ;
192  delete OsirixParser;
193  delete errHandler;
194  return -1;
195  }
196 
197  std::cout<<"parsing document..."<<std::endl;
198 
199 
200  doc = OsirixParser->getDocument();
201 // DOMNodeList* list = doc->getChildNodes();
202  getUserData(doc->getDocumentElement());
203 
204 
206 
207  delete OsirixParser;
208  delete errHandler;
209 
210 
211 
212  return 0;
213 
214 }

Here is the call graph for this function:

void OsirixParser::parseOSIRIX_DICT ( DOMNodeList *  list)
private

Definition at line 250 of file OsirixParser.cxx.

References _imageindex, _roiname, OSIRIX_IMAGEINDEX, OSIRIX_INTEGER, OSIRIX_NAME, OSIRIX_POINT_MM, OSIRIX_POINT_PX, OSIRIX_STRING, parseOSIRIX_POINT_MM(), and parseOSIRIX_POINT_PX().

Referenced by getUserData().

250  {
251  int i, j;
252  DOMNode* node, *childnode, *childnode1, *childarray;
253  std::string point_mm, point_px, osirixinteger, imageindex, temp;
254  DOMNodeList* childlist;
255  point_mm = OSIRIX_POINT_MM;
256  point_px = OSIRIX_POINT_PX;
257  imageindex = OSIRIX_IMAGEINDEX;
258  osirixinteger = OSIRIX_INTEGER;
259 
260  std::string osirixstring = OSIRIX_STRING;
261  std::string osirixname = OSIRIX_NAME;
262 
263 
264  for(i = 0; i < (int)(list->getLength()); i++){
265  node = list->item(i);
266  childlist = node->getChildNodes();
267  for(j = 0; j < (int)(childlist->getLength());j++){
268  childnode = childlist->item(j);
269  temp = XMLString::transcode(childnode->getTextContent());
270 
271 
272  if(point_mm.compare(temp)==0){
273  childarray = childlist->item(j+2);
274  //temp = XMLString::transcode(childarray->getNodeName());
275  if(childarray != 0){
276  parseOSIRIX_POINT_MM(childarray->getChildNodes());
277  }
278  }else if(point_px.compare(temp)==0){
279  childarray = childlist->item(j+2);
280  //temp = XMLString::transcode(childarray->getNodeName());
281  if(childarray != 0){
282  parseOSIRIX_POINT_PX(childarray->getChildNodes());
283  }
284  }else if(imageindex.compare(temp) == 0){
285  childnode1 = childlist->item(j+2);
286  if(childnode1 != NULL && osirixinteger.compare(XMLString::transcode(childnode1->getNodeName())) == 0){
287  _imageindex = atoi(XMLString::transcode(childnode1->getTextContent()));
288  }
289  } else if(osirixname.compare(temp) == 0) {
290  // keep information about the name of the ROI
291  childnode1 = childlist->item(j+2);
292  if(childnode1 != NULL && osirixstring.compare(XMLString::transcode(childnode1->getNodeName())) == 0){
293  char* roiname = XMLString::transcode(childnode1->getTextContent());
294  _roiname = string(roiname);
295  }
296  }
297  }
298  }
299 }

Here is the call graph for this function:

Here is the caller graph for this function:

void OsirixParser::parseOSIRIX_POINT_MM ( DOMNodeList *  list)
private

Definition at line 301 of file OsirixParser.cxx.

References _roiname, contoursmapMM, contoursnameMM, and OSIRIX_STRING.

Referenced by parseOSIRIX_DICT().

301  {
302  int i, stringfound0, stringfound1;
303  DOMNode* node;
304  string temp, osirix_string, numx, numy, numz;
305  vector<double>* vectorx;
306  vector<double>* vectory;
307  vector<double>* vectorz;
308  vectorXYZ vectorxyz;
309  double x, y, z;
310 
311  vectorx = new vector<double>;
312  vectory = new vector<double>;
313  vectorz = new vector<double>;
314 
315  osirix_string = OSIRIX_STRING;
316 
317  for(i = 0; i < (int)(list->getLength()); i++){
318  node = list->item(i);
319  if(osirix_string.compare(XMLString::transcode(node->getNodeName()))==0){
320  temp = XMLString::transcode(node->getTextContent());
321 
322  stringfound0 = temp.find(",",0);
323  numx = temp.substr(1, stringfound0-1);
324 
325  stringfound1 = temp.find(",",stringfound0+1);
326  numy = temp.substr(stringfound0+1, stringfound1-stringfound0-1);
327 
328  stringfound0 = temp.find(")",stringfound1+1);
329  numz = temp.substr(stringfound1+1, stringfound0-stringfound1-1);
330 
331  x = atof(numx.c_str());
332  y = atof(numy.c_str());
333  z = atof(numz.c_str());
334 
335  vectorx->push_back(x);
336  vectory->push_back(y);
337  vectorz->push_back(z);
338  }
339  }
340  if(vectorx->size() > 0){
341  vectorxyz.push_back(*vectorx);
342  vectorxyz.push_back(*vectory);
343  vectorxyz.push_back(*vectorz);
344  contoursmapMM.insert(pair<int, vectorXYZ>(contoursmapMM.size(), vectorxyz));
345  contoursnameMM.insert(pair<int, string>(contoursnameMM.size(), _roiname));
346  }
347 }

Here is the caller graph for this function:

void OsirixParser::parseOSIRIX_POINT_PX ( DOMNodeList *  list)
private

Definition at line 349 of file OsirixParser.cxx.

References _imageindex, _roiname, contoursmapPX, contoursnamePX, and OSIRIX_STRING.

Referenced by parseOSIRIX_DICT().

349  {
350  int i, stringfound0, stringfound1;
351  DOMNode* node;
352  string temp, osirix_string, numx, numy;
353  vector<double>* vectorx;
354  vector<double>* vectory;
355  vector<double>* vectorz;
356  vectorXYZ vectorxyz;
357  double x, y, z;
358 
359  vectorx = new vector<double>;
360  vectory = new vector<double>;
361  vectorz = new vector<double>;
362 
363  osirix_string = OSIRIX_STRING;
364 
365  for(i = 0; i < (int)(list->getLength()); i++){
366  node = list->item(i);
367  if(osirix_string.compare(XMLString::transcode(node->getNodeName()))==0){
368  temp = XMLString::transcode(node->getTextContent());
369 
370  stringfound0 = temp.find(",",0);
371  numx = temp.substr(1, stringfound0-1);
372 
373  stringfound1 = temp.find(")",stringfound0+1);
374  numy = temp.substr(stringfound0+1, stringfound1-stringfound0-1);
375 
376  x = atof(numx.c_str());
377  y = atof(numy.c_str());
378 
379  vectorx->push_back(x);
380  vectory->push_back(y);
381  vectorz->push_back(_imageindex);
382  }
383  }
384  if(vectorx->size() > 0){
385  vectorxyz.push_back(*vectorx);
386  vectorxyz.push_back(*vectory);
387  vectorxyz.push_back(*vectorz);
388  contoursmapPX.insert(pair<int, vectorXYZ>(contoursmapPX.size(), vectorxyz));
389  contoursnamePX.insert(pair<int, string>(contoursnamePX.size(), _roiname));
390  }
391 }

Here is the caller graph for this function:

void OsirixParser::saveCreaContoursFormat ( )
private

Definition at line 407 of file OsirixParser.cxx.

References TEMPIMPORTOSIRIXFILE, writeContours(), writeContoursStatic(), and writeHeader().

Referenced by ParseFile().

407  {
408  FILE *pFile=fopen(TEMPIMPORTOSIRIXFILE.c_str(),"w+");
409 
410  if(pFile){
411  writeHeader(pFile);
412  writeContours(pFile);
413  writeContoursStatic(pFile);
414  fclose(pFile);
415  }
416 }

Here is the call graph for this function:

Here is the caller graph for this function:

void OsirixParser::setErrorLine ( DOMNodeList *  list)
private

Definition at line 216 of file OsirixParser.cxx.

References errorline.

216  {
217 
218  DOMNode* node = list->item(0);
219  this->errorline = XMLString::transcode(node->getTextContent());
220 
221 }
void OsirixParser::writeContours ( FILE *  pFile)
private

Definition at line 427 of file OsirixParser.cxx.

References _extent, _spacing, contoursmapPX, CREACONTOUR_INSTANT, CREACONTOUR_NUMBEROFCONTROLPOINTS, CREACONTOUR_TYPEMODEL, and CREACONTOUR_TYPEVIEW.

Referenced by saveCreaContoursFormat().

427  {
428 
429  map<int, vectorXYZ>::iterator itPX;
430  vector<double> vectx, vecty, vectz;
431  int i, valuez;
432  int dimz = 0, dimy = 0;
433 
434  if(_extent != 0){
435  dimz = _extent[5] - _extent[4] + 1;
436  dimy = _extent[3] - _extent[2] + 1;
437  }
438 
439  /*for (itMM = contoursmapMM.begin(), itPX = contoursmapPX.begin();
440  itMM != contoursmapMM.end(), itPX != contoursmapPX.end();
441  itMM++, itPX++ ){*/
442  for (itPX = contoursmapPX.begin(); itPX != contoursmapPX.end(); itPX++ ){
443 
444  vectx = ((*itPX).second)[0];
445  vecty = ((*itPX).second)[1];
446  vectz = ((*itPX).second)[2];
447 
448  if(!vectz.empty()){
449 
450  valuez = (int) vectz[0] / _spacing[2];
451 
452  fprintf(pFile, CREACONTOUR_INSTANT);
453  fprintf(pFile, " 1 %d 1 1 1 1\n",dimz - valuez);
454  fprintf(pFile, CREACONTOUR_TYPEMODEL);
455  fprintf(pFile, " 1\n");
456  fprintf(pFile, CREACONTOUR_NUMBEROFCONTROLPOINTS);
457  fprintf(pFile, " %d\n", vectz.size());
458  for(i = 0; i < vectx.size(); i++){
459  fprintf(pFile, "%f %f 900.00\n", vectx[i]/ _spacing[0], dimy - vecty[i]/ _spacing[1]);
460  // fprintf(pFile, "%f %f %f\n", vectx[i] , vecty[i], vectz[i]);
461  }
462  fprintf(pFile, CREACONTOUR_TYPEVIEW);
463  fprintf(pFile, " 1\n");
464 
465  }
466  }
467 }

Here is the caller graph for this function:

void OsirixParser::writeContoursStatic ( FILE *  pFile)
private

Definition at line 418 of file OsirixParser.cxx.

References _extent, _spacing, CREACONTOUR_IMAGEDIMENSIONS, CREACONTOUR_IMAGESPACING, and CREACONTOUR_NUMBEROFCONTOURSSTATIC.

Referenced by saveCreaContoursFormat().

418  {
419  fprintf(pFile, CREACONTOUR_IMAGEDIMENSIONS);
420  fprintf(pFile, " %d %d %d\n", _extent[1] - _extent[0],_extent[3] - _extent[2], _extent[5] - _extent[4]);
421  fprintf(pFile, CREACONTOUR_IMAGESPACING);
422  fprintf(pFile, " %f %f %f\n", _spacing[0], _spacing[1], _spacing[2]);
423  fprintf(pFile, CREACONTOUR_NUMBEROFCONTOURSSTATIC);
424  fprintf(pFile, " 0\n");
425 }

Here is the caller graph for this function:

void OsirixParser::writeHeader ( FILE *  pFile)
private

Definition at line 469 of file OsirixParser.cxx.

References _extent, _spacing, contoursmapPX, CREACONTOUR, CREACONTOUR_IMAGEDIMENSIONS, CREACONTOUR_IMAGESPACING, CREACONTOUR_NUMBEROFCONTOURS, and CREACONTOUR_VERSION.

Referenced by saveCreaContoursFormat().

469  {
470 
471 
472  fprintf(pFile, CREACONTOUR);
473  fprintf(pFile, "\n");
474  fprintf(pFile, CREACONTOUR_VERSION);
475  fprintf(pFile, "\n");
476  fprintf(pFile, CREACONTOUR_IMAGEDIMENSIONS);
477  fprintf(pFile, " %d %d %d\n", _extent[1] - _extent[0],_extent[3] - _extent[2], _extent[5] - _extent[4]);
478  fprintf(pFile, CREACONTOUR_IMAGESPACING);
479  fprintf(pFile, " %f %f %f\n", _spacing[0], _spacing[1], _spacing[2]);
480  fprintf(pFile, CREACONTOUR_NUMBEROFCONTOURS);
481  fprintf(pFile, " %d\n", contoursmapPX.size());
482 
483 
484 
485 }

Here is the caller graph for this function:

Member Data Documentation

int OsirixParser::_extent[6]
private

Definition at line 141 of file OsirixParser.h.

Referenced by OsirixParser(), writeContours(), writeContoursStatic(), and writeHeader().

int OsirixParser::_imageindex
private

Definition at line 109 of file OsirixParser.h.

Referenced by parseOSIRIX_DICT(), and parseOSIRIX_POINT_PX().

std::string OsirixParser::_roiname
private

Definition at line 110 of file OsirixParser.h.

Referenced by parseOSIRIX_DICT(), parseOSIRIX_POINT_MM(), and parseOSIRIX_POINT_PX().

double OsirixParser::_spacing[3]
private

Definition at line 140 of file OsirixParser.h.

Referenced by OsirixParser(), writeContours(), writeContoursStatic(), and writeHeader().

std::map<int, vectorXYZ> OsirixParser::contoursmapMM
private

Definition at line 144 of file OsirixParser.h.

Referenced by parseOSIRIX_POINT_MM().

std::map<int, vectorXYZ> OsirixParser::contoursmapPX
private

Definition at line 145 of file OsirixParser.h.

Referenced by parseOSIRIX_POINT_PX(), writeContours(), and writeHeader().

std::map<int, std::string> OsirixParser::contoursnameMM
private

Definition at line 147 of file OsirixParser.h.

Referenced by parseOSIRIX_POINT_MM().

std::map<int, std::string> OsirixParser::contoursnamePX
private

Definition at line 148 of file OsirixParser.h.

Referenced by parseOSIRIX_POINT_PX().

const char* OsirixParser::CREACONTOUR
private

Definition at line 125 of file OsirixParser.h.

Referenced by OsirixParser(), and writeHeader().

const char* OsirixParser::CREACONTOUR_IMAGEDIMENSIONS
private

Definition at line 127 of file OsirixParser.h.

Referenced by OsirixParser(), writeContoursStatic(), and writeHeader().

const char* OsirixParser::CREACONTOUR_IMAGESPACING
private

Definition at line 128 of file OsirixParser.h.

Referenced by OsirixParser(), writeContoursStatic(), and writeHeader().

const char* OsirixParser::CREACONTOUR_INSTANT
private

Definition at line 131 of file OsirixParser.h.

Referenced by OsirixParser(), and writeContours().

const char* OsirixParser::CREACONTOUR_NUMBEROFCONTOURS
private

Definition at line 129 of file OsirixParser.h.

Referenced by OsirixParser(), and writeHeader().

const char* OsirixParser::CREACONTOUR_NUMBEROFCONTOURSSTATIC
private

Definition at line 136 of file OsirixParser.h.

Referenced by OsirixParser(), and writeContoursStatic().

const char* OsirixParser::CREACONTOUR_NUMBEROFCONTROLPOINTS
private

Definition at line 133 of file OsirixParser.h.

Referenced by OsirixParser(), and writeContours().

const char* OsirixParser::CREACONTOUR_TYPEMODEL
private

Definition at line 132 of file OsirixParser.h.

Referenced by OsirixParser(), and writeContours().

const char* OsirixParser::CREACONTOUR_TYPEVIEW
private

Definition at line 134 of file OsirixParser.h.

Referenced by OsirixParser(), and writeContours().

const char* OsirixParser::CREACONTOUR_VERSION
private

Definition at line 126 of file OsirixParser.h.

Referenced by OsirixParser(), and writeHeader().

std::string OsirixParser::errorline
private

Definition at line 107 of file OsirixParser.h.

Referenced by ParseFile(), and setErrorLine().

const char* OsirixParser::OSIRIX_ARRAY
private

Definition at line 115 of file OsirixParser.h.

Referenced by OsirixParser().

const char* OsirixParser::OSIRIX_DICT
private

Definition at line 112 of file OsirixParser.h.

Referenced by getUserData(), and OsirixParser().

const char* OsirixParser::OSIRIX_IMAGEINDEX
private

Definition at line 116 of file OsirixParser.h.

Referenced by OsirixParser(), and parseOSIRIX_DICT().

const char* OsirixParser::OSIRIX_IMAGES
private

Definition at line 114 of file OsirixParser.h.

Referenced by OsirixParser().

const char* OsirixParser::OSIRIX_INTEGER
private

Definition at line 117 of file OsirixParser.h.

Referenced by OsirixParser(), and parseOSIRIX_DICT().

const char* OsirixParser::OSIRIX_KEY
private

Definition at line 113 of file OsirixParser.h.

Referenced by OsirixParser().

const char* OsirixParser::OSIRIX_NAME
private

Definition at line 123 of file OsirixParser.h.

Referenced by OsirixParser(), and parseOSIRIX_DICT().

const char* OsirixParser::OSIRIX_NUMBEROFROIS
private

Definition at line 118 of file OsirixParser.h.

Referenced by OsirixParser().

const char* OsirixParser::OSIRIX_POINT_MM
private

Definition at line 120 of file OsirixParser.h.

Referenced by OsirixParser(), and parseOSIRIX_DICT().

const char* OsirixParser::OSIRIX_POINT_PX
private

Definition at line 121 of file OsirixParser.h.

Referenced by OsirixParser(), and parseOSIRIX_DICT().

const char* OsirixParser::OSIRIX_ROIS
private

Definition at line 119 of file OsirixParser.h.

Referenced by OsirixParser().

const char* OsirixParser::OSIRIX_STRING
private
std::string OsirixParser::schema
private

Definition at line 105 of file OsirixParser.h.

Referenced by OsirixParser(), and ParseFile().

std::string OsirixParser::TEMPIMPORTOSIRIXFILE
private

Definition at line 138 of file OsirixParser.h.

Referenced by getContoursFileName(), OsirixParser(), and saveCreaContoursFormat().


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