xValues=(double*)malloc(NUM_POINTS*sizeof(double));
yValues=(double*)malloc(NUM_POINTS*sizeof(double));
xValues=(double*)malloc(NUM_POINTS*sizeof(double));
yValues=(double*)malloc(NUM_POINTS*sizeof(double));
- unsigned short* histogramPointer=(unsigned short*)histogramImageData->GetScalarPointer(0,0,0);
-
- for(int i=0; i< histogramSize; i++)
+ double* histogramPointer=(double*)histogramImageData->GetScalarPointer(0,0,0);
+ int i;
+ for(i=0; i< histogramSize; i++)
pGraphicalFunction* histogramFunction=plotter->getFunctionForVectors(xValues,histogramSize,yValues,histogramSize);
pGraphicalFunction* histogramFunction=plotter->getFunctionForVectors(xValues,histogramSize,yValues,histogramSize);
double xValues[5],yValues[5];
//xValues
int maxValueGrey=histogram->getMaximumLevelOfGrey();
double xValues[5],yValues[5];
//xValues
int maxValueGrey=histogram->getMaximumLevelOfGrey();
yValues[4]=0;
pGraphicalFunction * tf = plotter ->getFunctionForVectors( xValues, 5, yValues, 5 );
yValues[4]=0;
pGraphicalFunction * tf = plotter ->getFunctionForVectors( xValues, 5, yValues, 5 );
GetClientSize(&scrX,&scrY);
plotter->SetSize(scrX,scrY);
pGraphicalFunction* actual=plotter->getFunction(idTransferenceFunction);
GetClientSize(&scrX,&scrY);
plotter->SetSize(scrX,scrY);
pGraphicalFunction* actual=plotter->getFunction(idTransferenceFunction);
void HistogramWidget::getTransferenceFunctionPoint(int index,int& x,int& y)
{
pGraphicalFunction* tf=plotter->getFunction(idTransferenceFunction);
void HistogramWidget::getTransferenceFunctionPoint(int index,int& x,int& y)
{
pGraphicalFunction* tf=plotter->getFunction(idTransferenceFunction);
- void HistogramWidget:: getDataBarColorPoint(int index,int&x, int& red,int& green,int& blue)
+ void HistogramWidget::getDataBarColorPoint(int index,int&x, int& red,int& green,int& blue)
plotter->getBarColorDataAt(index,tmp,red,green,blue);
plotter->getBarColorDataAt(index,tmp,red,green,blue);
}
/*
Returns the maximum value ot the histogram that is show to the user
*/
float HistogramWidget::getMaxShowedPorcentage()
{
}
/*
Returns the maximum value ot the histogram that is show to the user
*/
float HistogramWidget::getMaxShowedPorcentage()
{
- float porcentageMaxX=plotter->getMaxShowedPorcentage();
- pGraphicalFunction* histogramFunction=plotter->getFunction(idHistogram);
- int min=histogramFunction->getMinX();
- float x=porcentageMaxX*(histogramFunction->getMaxX()-min);
+ float porcentageMaxX = plotter->getMaxShowedPorcentage();
+ pGraphicalFunction* histogramFunction = plotter->getFunction(idHistogram);
+ int min = histogramFunction->getMinX();
+ float x = porcentageMaxX*(histogramFunction->getMaxX()-min);
- float porcentageMinX=plotter->getMinShowedPorcentage();
- pGraphicalFunction* histogramFunction=plotter->getFunction(idHistogram);
- int min=histogramFunction->getMinX();
- float x=porcentageMinX*(histogramFunction->getMaxX()-min);
+ float porcentageMinX = plotter->getMinShowedPorcentage();
+ pGraphicalFunction* histogramFunction = plotter->getFunction(idHistogram);
+ int min = histogramFunction->getMinX();
+ float x = porcentageMinX*(histogramFunction->getMaxX()-min);
- float porcentageActualX=plotter->getMinShowedPorcentage();
- pGraphicalFunction* histogramFunction=plotter->getFunction(idHistogram);
- int min=histogramFunction->getMinX();
- float x=porcentageActualX*(histogramFunction->getMaxX()-min);
- return min+ x;
+ float porcentageActualX = plotter->getMinShowedPorcentage();
+ pGraphicalFunction* histogramFunction = plotter->getFunction(idHistogram);
+ int min = histogramFunction->getMinX();
+ float x = porcentageActualX*(histogramFunction->getMaxX()-min);
+ return min + x;
bool result=false;
pGraphicalFunction* tf=plotter->getFunction(idTransferenceFunction);
//printf("EED %p HistogramWidget::addPointToTransferenceFunction tp%p x%f y%f %d\n",this, tf, x ,y, idTransferenceFunction);
bool result=false;
pGraphicalFunction* tf=plotter->getFunction(idTransferenceFunction);
//printf("EED %p HistogramWidget::addPointToTransferenceFunction tp%p x%f y%f %d\n",this, tf, x ,y, idTransferenceFunction);
}
/**
** Returns two vectors, the grey level of the point and its value, the value is between [0,1]
**/
}
/**
** Returns two vectors, the grey level of the point and its value, the value is between [0,1]
**/