getImageDataDialog = (GETIMAGEDATADIALOG)GetProcAddress(gimmickhandle, "getImageDataDialog");
+ std::cout<<"imagehandle "<<gimmickhandle<<std::endl;
std::cout<<"imagedatadialog "<<getImageDataDialog<<std::endl;
if(getImageDataDialog!=NULL){
gimmicknotfound = false;
}
}
-#else
- //GNU part
-#endif
+#endif
if(gimmicknotfound){
img = reader->GetOutput();
}
}
+
+
+
}
//-------------------------------------------------------------------
{
logicColorPoints.push_back(newColorPoint);
addedPoint = true;
- }
- for ( iter = logicColorPoints.begin(); i<=maxIndex && !addedPoint; iter++ )
- {
- nextIter = iter;
- int before = (*iter)->getRealX() ;
- if(before>xRealValue && i==0)
- {
- //Is the first point
- logicColorPoints.insert( iter, newColorPoint );
- addedPoint =true;
- lastAddedPoint = newColorPoint;
- }
- else if(before<xRealValue && i==maxIndex)
+ }else{
+ iter = logicColorPoints.begin();
+ for (i=0; i<=maxIndex && !addedPoint; i++)
{
- //Is the last point
- logicColorPoints.insert( iter+1, newColorPoint );
- addedPoint =true;
- lastAddedPoint = newColorPoint;
- }
- else if(i<maxIndex)
- {
- //
- nextIter++;
- int after = (*nextIter)->getRealX();
- if( before < xRealValue && after> xRealValue)
+ nextIter = iter;
+ int before = (*iter)->getRealX() ;
+ if(before>xRealValue && i==0)
+ {
+ //Is the first point
+ logicColorPoints.insert( iter, newColorPoint );
+ addedPoint =true;
+ lastAddedPoint = newColorPoint;
+ }
+ else if(before<xRealValue && i==maxIndex)
{
- logicColorPoints.insert( nextIter, newColorPoint );
+ //Is the last point
+ logicColorPoints.push_back(newColorPoint );
addedPoint =true;
lastAddedPoint = newColorPoint;
}
- }
- i++;
- }
+ else if(i<maxIndex)
+ {
+ //
+ nextIter++;
+ int after = (*nextIter)->getRealX();
+ if( before < xRealValue && after> xRealValue)
+ {
+ logicColorPoints.insert( nextIter, newColorPoint );
+ addedPoint =true;
+ lastAddedPoint = newColorPoint;
+ }
+ }
+ //std::cout<<"JCPaddColorPoint iterator "<<*iter<<std::endl;
+ if(!addedPoint)
+ ++iter;
+ }
+ }
}
return addedPoint;
}
HistogramDialog* hDlg=new HistogramDialog(NULL,_T("Color table"),imagedata,2);
- hDlg->erasePointsTransferenceFunction();
+ hDlg->erasePointsTransferenceFunction();
int ctfSize=ctfunVectorRed->size();
if(ctfSize>0)
{
double gr = (*ctfunVectorPoint)[i];
double r = (*ctfunVectorRed)[i];
double g = (*ctfunVectorGreen)[i];
- double b = (*ctfunVectorBlue)[i];
-
+ double b = (*ctfunVectorBlue)[i];
+
hDlg->addColorPoint(gr,(int)(r*255),(int)(g*255),(int)(b*255));
+
i++;
}
}