}
//------------------------------------------------------------------------
- void ContourExtractData::SetLstManualContourModel( std::vector<manualContourModel*> lstManConMod)
+ void ContourExtractData::SetLstManualContourModel( std::vector<manualBaseModel*> lstManConMod)
{
this->lstManConMod = lstManConMod;
}
//------------------------------------------------------------------------
void ContourExtractData::GetMinMaxPoint(int *minPoint,
int *maxPoint,
- manualContourModel *manualcontourmodel
+ manualBaseModel *manualcontourmodel
)
{
int i;
//int np = manualcontourmodel->GetSizeLstPoints( ); // number of control points // JPRx
-
+
// JSTG 26-02-08 ---------------------------------------------------------------------------------------
//int nps = manualviewbaseecontour->GetNumberOfPointsSpline(); // number of points in the spline
int nps = manualcontourmodel->GetNumberOfPointsSpline(); // number of points in the spline
{
int i,size = lstManConMod.size();
+
for(i=0 ; i<size ; i++)
{
GetMinMaxPoint(minPoint,maxPoint,lstManConMod[i]);
{
for (i=0;i<size;i++)
{
- numberLeft = AnalisisContourInsideV2(x,y, i );
+ // To process the statistics of the Points contour the procedure is different
+ // RaC 19-09-09
+ manualBaseModel *mbm = lstManConMod[i];
+ if(mbm->GetTypeModel()==7)
+ {
+ if(mbm->IsPoint(x,y)==true)
+ {
+ numberLeft=1;
+ }
+ }//if
+ else
+ {
+ numberLeft = AnalisisContourInsideV2(x,y, i );
+ }//else
+
if ( (numberLeft % 2) ==1){ numberInside++; }
}
if ( numberInside == (size) ){ result=true; }
} // AND Intersection
+ numberLeft=0;
if (typeOperation==1) // OR All
{
for (i=0;i<size;i++)
{
- numberLeft = AnalisisContourInsideV2(x,y, i );
+ // To process the statistics of the Points contour the procedure is different
+ // RaC 19-09-09
+ manualBaseModel *mbm = lstManConMod[i];
+ if(mbm->GetTypeModel()==7)
+ {
+ if(mbm->IsPoint(x,y)==true)
+ {
+ numberLeft=1;
+ }
+ }//if
+ else
+ {
+ numberLeft = AnalisisContourInsideV2(x,y, i );
+ }//else
if ( (numberLeft % 2) ==1){ result=true; }
}
} // OR All
+ numberLeft=0;
+
if (typeOperation==2) // XOR crown
{
for (i=0;i<size;i++)
{
- numberLeft = numberLeft + AnalisisContourInsideV2(x,y, i );
+ // To process the statistics of the Points contour the procedure is different
+ // RaC 19-09-09
+ manualBaseModel *mbm = lstManConMod[i];
+ if(mbm->GetTypeModel()==7)
+ {
+ if(mbm->IsPoint(x,y)==true)
+ {
+ numberLeft=1;
+ }
+ }//if
+ else
+ {
+ numberLeft = numberLeft + AnalisisContourInsideV2(x,y, i );
+ }//else
+
}
if ( numberLeft % 2 ==1){ result = true; }
}// XOR crown
} // for
} // for
-
// Borrame
// if (this->okImagesResults==true){
// imagedataValueResult->Modified();
{
int i,y;
double x1,y1,z1,x2,y2,z2;
- manualContourModel *manualcontourmodel= lstManConMod[iContour];
+ manualBaseModel *manualcontourmodel= lstManConMod[iContour];
int nps = manualcontourmodel->GetNumberOfPointsSpline(); // number of points in the spline
manualcontourmodel->UpdateSpline();
//------------------------------------------------------------------------------------------------------