43 seconds = time (NULL);
73 seconds = time (NULL);
82 mkdir(tmpdir.c_str());
85 mkdir(tmpdir.c_str(),755);
110 std::vector<double> vectspc;
112 for(
int i = 0; i < (int)(vectimg.size()); i++){
113 vtkImageData* img = vectimg[i];
114 vtkImageChangeInformation* change = vtkImageChangeInformation::New();
115 change->SetInformationInput(img);
116 change->SetInputConnection(img->GetProducerPort());
118 img->GetSpacing(spc);
119 change->SetOutputSpacing(1,1,1);
123 vectspc.push_back(spc[0]);
124 vectspc.push_back(spc[1]);
125 vectspc.push_back(spc[2]);
127 vectimg[i] = change->GetOutput();
144 std::string conceptsFN = datadir+
"holaConceptsFile.cf";
145 std::string imageSourcesFN = datadir+
"holaImagesInstantsFile.of";
146 std::string imageSectionsFN =
"";
147 std::string axeThingsFN =
"";
149 std::map<std::string, ImageSourceThing *> * sourcesMap =
new std::map<std::string, ImageSourceThing *>();
150 std::map<std::string, ImageSectionThing *>* sectionsMap =
new std::map<std::string, ImageSectionThing *>();
151 std::map<std::string, AxeThing *>* axesMap =
new std::map<std::string, AxeThing *>();
152 std::map<std::string, ContourThing *>* outlinesMap =
new std::map<std::string, ContourThing *>();
154 for(
int i = 0; i < (int)(
vectimages.size()); i++){
157 std::string imgstring =
"Source Image "+
intToString(i+1);
158 sourcesMap->insert(std::pair<std::string, ImageSourceThing *>( imgstring, thing));
192 char temp = k % 10 + 48;
194 result = temp + result;
250 Instant* act =
new Instant ( &vectInstant );
339 if (vecX->size()!=0){
341 int i,size=vecZ->size();
342 int actualSlice = instants[1];
343 for ( i=0 ; i<size ; i++ )
345 (*vecZ)[i] = actualSlice;
370 manualBaseModel*
KernelManagerContour::GetPoints(
int z,
int type, std::vector<double>* vecCtrlPointX,std::vector<double>* vecCtrlPointY,std::vector<double>* vecCtrlPointZ, std::string& theName,
int typeofcontour, std::vector<int> tempVector)
372 bool addedModel =
false;
373 manualBaseModel* manModelContour=NULL;
383 _contourPropagation->GetInitialControlPoints( idTmp , vecCtrlPointX,vecCtrlPointY,vecCtrlPointZ);
391 _contourPropagation->GetControlPoints( idTmp , 20.0 ,vecCtrlPointX,vecCtrlPointY,vecCtrlPointZ);
394 int sizeCtrPt = vecCtrlPointX->size();
395 for (
int j=0 ; j<sizeCtrPt ; j++)
398 manModelContour->AddPoint( (*vecCtrlPointX)[j] , (*vecCtrlPointY)[j] , -900 );
404 addedModel = theName.compare(
"") != 0;
406 manModelContour = NULL;
410 return manModelContour;
415 manualBaseModel *manModelContour=NULL;
423 manModelContour =
new manualContourModel();
429 manModelContour =
new manualContourModel();
435 manModelContour =
new manualContourModelRoi();
441 manModelContour =
new manualContourModelCircle();
447 manModelContour =
new manualContourModelLine();
453 manModelContour =
new manualBaseModel();
459 manModelContour =
new manualContourModelPolygon();
462 return manModelContour;
466 Instant instant(&tempvector);
468 std::vector<std::string> vectname;
469 for(
int i = 0; i < (int)(vectcont.size()); i++){
471 vectname.push_back((*contourthing)->getName());
481 std::vector<manualBaseModel*> lstTmp;
482 std::vector<manualBaseModel*> lstResult;
484 int i,iSize=lstManConMod.size();
485 for (i=0;i<iSize;i++)
487 lstTmp = lstManConMod[i]->ExploseModel();
489 for (j=0;j<jSize;j++)
491 lstResult.push_back( lstTmp[j] );
503 int index = inst[5]-1;
523 #ifdef ParserOsirix_BUILD
524 vtkImageData* sourceimage;
529 xsdfile.append(
"\\XML\\osirixschema.xsd");
532 OsirixParser p(xsdfile.c_str(), sourceimage->GetSpacing(), sourceimage->GetExtent());
534 if(p.ParseFile(filename.c_str())!= 0){