//EED04
void wxContourMainFrame ::loadState(std::string filename){
-
+
deleteAllContours();
onLoadContours(filename,false);
-
+
/* EED Borrame
char tmp[255];
FILE *pFile=fopen(filename.c_str(),"r+");
openContours(pFile,pFileData,false);
openContours(pFile,pFileData,true); //Load StaticContours
}
-
+
if (version=="1.0.2")
{
//EED001
dial->ShowModal();
int _tmpReadFileTypeOfTransformation = -1;
- bool transform = false;
+//EED bool transform = false;
if (dial->GetReturnCode() == wxID_OK)
{
_instantPanel->setConceptValue( name, actual );
}
+
void wxContourMainFrame::resetAppend(){
kernelManager->resetAppend();
}
+
void wxContourMainFrame::onSpreadAdd(){
std::vector<double> vecX;
std::vector<double> vecY;
std::vector<double> vecZ;
_theViewPanel->GetPointsOfActualContour(&vecX , &vecY , &vecZ );
-
std::vector<int> tempVector;
_instantPanel->getInstant( tempVector );
-
std::string val = kernelManager->onSpreadAdd(&vecX , &vecY , &vecZ, tempVector);
-
interfMainPanel::getInstance()->appendStringSpread(val);
+}
+
+void wxContourMainFrame::onSpreadAddAll(){
+//EED02
+ std::vector<int> tempVector;
+ _instantPanel->getInstant( tempVector );
+ int minZ,maxZ;
+ minZ = 0;
+ maxZ = interfMainPanel::getInstance()->GetImageDataSizeZ();
+ int z;
+ int sizeLstContourThings;
+ for ( z=minZ ; z<=maxZ ; z++ )
+ {
+ tempVector[1]=z;
+ Instant instant(&tempVector);
+ std::vector<ContourThing**> lstContourThings = kernelManager->getOutlinesAtInstant( &instant );
+ sizeLstContourThings = lstContourThings.size();
+ if (sizeLstContourThings>=1)
+ {
+ std::vector<double> vecX;
+ std::vector<double> vecY;
+ std::vector<double> vecZ;
+ ContourThing **contourthing = lstContourThings[0];
+ manualBaseModel *cModel = (*contourthing)->getModel();
+ int i,size = cModel->GetNumberOfPointsSpline();
+ double x,y,z;
+ for (i=0; i<size; i++)
+ {
+ cModel->GetSpline_i_Point(i, &x, &y, &z);
+ vecX.push_back(x);
+ vecY.push_back(y);
+ vecZ.push_back(z);
+ } // for i
+ std::string val = kernelManager->onSpreadAdd(&vecX , &vecY , &vecZ, tempVector);
+ interfMainPanel::getInstance()->appendStringSpread(val);
+ }// if sizeLstContourThings
+ } // for z
}
-void wxContourMainFrame::onSpreadGo(int type){
+void wxContourMainFrame::onSpreadGo(int type){
//JCP 20-10-08 Undo redo implementation
saveState();
//JCP 20-10-08 Undo redo implementation
-
wxBusyCursor wait;
std::vector<double> vecCtrlPointX;
std::vector<double> vecCtrlPointY;