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()
*/
bool pGraphicalFunction::AddPoint(int aX, int aY,bool order)
{
-
- bool added=logicFunction -> AddPoint( aX, aY,order );
- if(!fromWindow)
- setUp();
- else
- {
- logicFunction->setEndPoints();
- logicFunction->setStartPoints();
- }
+ printf("EED %p pGraphicalFunction::AddPoint %p (%d %d) \n", this, logicFunction, aX, aY);
+ bool added=false;
+ if (logicFunction!=NULL){
+ added=logicFunction -> AddPoint( aX, aY,order );
+ if(!fromWindow)
+ setUp();
+ else
+ {
+ logicFunction->setEndPoints();
+ logicFunction->setStartPoints();
+ } // if fromWindow
+ } // if logicFunction
return added;
}
{
f_colorPoints.clear();
int i = 0;
- while(i<colorVector.size())
+ while(i<(int)(colorVector.size()))
{
f_colorPoints.push_back(colorVector[i]);
i++;
void pGraphicalFunction :: getColorPoints(std::vector<pColorPoint *> &colorVector)
{
int i = 0;
- while(i<f_colorPoints.size())
+ while(i<(int)(f_colorPoints.size()))
{
pColorPoint * originaslPoint = f_colorPoints[i];
pColorPoint * copyPoint = new pColorPoint(originaslPoint->getRealX(), originaslPoint->getColor(), originaslPoint->isTemporalColor());
function->initializeSplineVectors();
UpdateAll();
}
- // bool added1= functions.Append(function)!=NULL; // JPRx
+
+// bool added1= functions.Append(function)!=NULL; // JPRx
+ functions.Append(function); //EED
int id=functions.IndexOf(function);
- /* bool added2= */ AddLayer(function);// JPRx
+
+ // bool added2= AddLayer(function);// JPRx
+ AddLayer(function); //EED
+
UpdateAll();
return id;//added1 && added2;
}
*/
int pPlotterWindow::addFunctionToMove(pGraphicalFunction *function)
{
- // bool added1= functionsToMove.Append(function)!=NULL; // JPRx
+ //bool added1= functionsToMove.Append(function)!=NULL; // JPRx
+ functionsToMove.Append(function); // EED
+
int id=functionsToMove.IndexOf(function);
UpdateAll();
return id;
int x = (int)(_vtkmprbasedata->GetX());
int y = (int)(_vtkmprbasedata->GetY());
int z = (int)(_vtkmprbasedata->GetZ());
- std::cout<<" vtkMPR3DDataViewer::Refresh() x="<<x<<" y= "<<y<<" z= "<<z;
SetPositionX( x );
SetPositionY( y );
SetPositionZ( z );
Program: wxMaracas
Module: $RCSfile: wxMPRWidget.cxx,v $
Language: C++
- Date: $Date: 2009/05/04 15:06:42 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2009/05/07 15:35:46 $
+ Version: $Revision: 1.13 $
Copyright: (c) 2002, 2003
License:
std::vector<double> *ctfunVectorGreen = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorGreen();
std::vector<double> *ctfunVectorBlue = this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetctFunVectorBlue();
+ printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfun %p\n", this, ctfun);
+ printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfunVectorPoint %p\n", this, ctfunVectorPoint);
+ printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfunVectorRed %p\n", this, ctfunVectorRed);
+ printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfunVectorGreen %p\n", this, ctfunVectorGreen);
+ printf("EED %p wxVtkMPR3DViewCntrlPanel::OnEditColorTable ctfunVectorBlue %p\n", this, ctfunVectorBlue);
+
+
//void *p=this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer(); // JPRx
std::vector<double>* bctf = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetBlueColorsOfColorTransferenceFVector();
vtkImageData *imagedata = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+
+
//use for update in the refresh
/*
vtkVolumeRayCastMapper* volumeMapper = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVolumeMapper();
}
void wxVtkMPR3DView::Configure(){
-
_wxvtk3Dbaseview->Configure();
_wxvtkmpr3DviewCntrlPanel->UpdateControlPanel();
- _wxvtk3Dbaseview->GetRenderer()->Clear();
+
+//EED ?????? 07Mai2009
+// _wxvtk3Dbaseview->GetRenderer()->Clear();
+
// Actors are added to the renderer.
vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
Program: wxMaracas
Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $
Language: C++
- Date: $Date: 2009/05/04 07:35:42 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2009/05/07 15:35:46 $
+ Version: $Revision: 1.11 $
Copyright: (c) 2002, 2003
License:
mwxvtkmpr3Dview = new wxVtkMPR3DView( mwxvtk3Dbaseview_Clipping3D );
-
vtkmpr3Ddataviewer = new vtkMPR3DDataViewer();
-
-
wxWindow *window3D = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor();
wxPanel *panelControl = new wxPanel(panelClipping3D,-1);