yValues[4]=0;
pGraphicalFunction * tf = plotter ->getFunctionForVectors( xValues, 5, yValues, 5 );
+ printf("EED %p HistogramWidget::drawTransferenceFunction %p\n", this , tf);
// Including and drawing the created function in the plotter
if (tf)
{
*/
bool HistogramWidget::addPointToTransferenceFunction(double x, double y)
{
+ bool result=false;
pGraphicalFunction* tf=plotter->getFunction(idTransferenceFunction);
- return tf->AddPoint(x,y);
+printf("EED %p HistogramWidget::addPointToTransferenceFunction tp%p x%f y%f %d\n",this, tf, x ,y, idTransferenceFunction);
+ if (tf!=NULL) { result=tf->AddPoint(x,y); }
+
+ return result;
}
/*
add a color point to the histogram
{
// we have to erase the points
pGraphicalFunction* tf=plotter->getFunction(idTransferenceFunction);
- int numOfPoints=tf->getSizePoints();
- int i=numOfPoints-1;//-2;
- while(i>=0)
- {
- tf->deletePointAt(i);
- i--;
- }
-
- }
+ if (tf!=NULL){
+ int numOfPoints=tf->getSizePoints();
+ int i=numOfPoints-1;//-2;
+ while(i>=0)
+ {
+ tf->deletePointAt(i);
+ i--;
+ } // while
+ } // if tf
+ } // if transferenceFunctionHasPoints
//we set for actual the histogram
//plotter->setActual()