// (the one provided in the attribute 'name' of the tag 'input')
// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
- wxMaracasMultipleVolumeRendererView* volview = (wxMaracasMultipleVolumeRendererView*)bbGetOutputWidget();
+ wxMaracasMultipleVolumeRendererView* volview = (wxMaracasMultipleVolumeRendererView*)bbGetOutputWidget();
vtkImageData* _img1 = bbGetInputIn1();
vtkImageData* _img2 = bbGetInputIn2();
vtkImageData* _img3 = bbGetInputIn3();
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
- bbSetInputIn1(0);
+ bbSetInputIn1(0);
bbSetInputIn2(0);
bbSetInputIn3(0);
bbSetInputIn4(0);
}
}
-// EO namespace bbcreaMaracasVisu
\ No newline at end of file
+// EO namespace bbcreaMaracasVisu
+
Program: wxMaracas
Module: $RCSfile: CutModelData.cxx,v $
Language: C++
- Date: $Date: 2009/09/08 08:14:27 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2009/10/16 15:17:56 $
+ Version: $Revision: 1.4 $
Copyright: (c) 2002, 2003
License:
vtkPolyData* CutModelData::getPolyData()throw( CutModelException){
return _Mapper->GetInput();
-}
\ No newline at end of file
+}
+
CutModelFigureCube::CutModelFigureCube()
: CutModelFigure()
{
- _vtkcube = vtkCubeSource::New();
+ _vtkcube = vtkCubeSource::New();
_vtkcube->SetXLength (1);
_vtkcube->SetYLength (1);
_vtkcube->SetZLength (1);
{
return "Cube";
}
+
vtkPolyData* CutModelFigureCube::getPolyData(){
return _vtkcube->GetOutput();
-}
\ No newline at end of file
+}
+
{
return "Sphere";
}
+
vtkPolyData* CutModelFigureSphere::getPolyData(){
return _vtksphere->GetOutput();
-}
\ No newline at end of file
+}
+
Program: wxMaracas
Module: $RCSfile: CutModelSaveBinInfo.cxx,v $
Language: C++
- Date: $Date: 2009/09/08 08:14:27 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/10/16 15:17:56 $
+ Version: $Revision: 1.2 $
Copyright: (c) 2002, 2003
License:
transform->SetMatrix(matrix);
return transform;
-}
\ No newline at end of file
+}
+
_spcX = spcX;
_spcY = spcY;
_spcZ = spcZ;
-}
\ No newline at end of file
+}
+
Connect(_sliderwindowlevel->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&HistogramDialogComboBox::OnWindowLevelChanged);
return sizersliders;
-
}
double HistogramDialogComboBox::GetWindowLevel(){
setSlidersValue();
}
+
void HistogramDialogComboBox::setSlidersValue(){
if(_img!=NULL){
if(_slidercolor!=NULL){
bool createaddandremovecontrols = true;
HistogramDialog* dialog = new HistogramDialog(this,_T("Color Configuration"),createaddandremovecontrols);
- dialog->initializeHistogram(_img);
+ dialog->initializeHistogram(_img);
dialog->setInfoPanExtraControls(_bitmapsitems);
if(dialog->ShowModal()==wxID_OK){
dialog->Destroy();
}
}
+
void HistogramDialogComboBox::saveCurrentConfiguration(std::vector<HistogramDialogComboBoxItem*>& itembitmaps,std::string filename){
std::ofstream file;
{
int i;
for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
- _mCubes[i] ->Delete();
- _tissueStripper[i] ->Delete();
- _tissueMapper[i] ->Delete();
- _tissuePlanes[i] ->Delete();
- _tissueClipper[i] ->Delete();
+ _mCubes[i]->Delete();
+ _tissueStripper[i]->Delete();
+ _tissueMapper[i]->Delete();
+ _tissuePlanes[i]->Delete();
+ _tissueClipper[i]->Delete();
}
- _outlineData ->Delete();
- _mapOutline ->Delete();
- _outline ->Delete();
+ _outlineData->Delete();
+ _mapOutline->Delete();
+ _outline->Delete();
// Volume
- _tfun ->Delete();
- _ctfun ->Delete();
- _compositeFunction ->Delete();
- _volumeMapper ->Delete();
- _volumeProperty ->Delete();
- _newvol ->Delete();
- _volumePlanes ->Delete();
+ _tfun->Delete();
+ _ctfun->Delete();
+ _compositeFunction->Delete();
+ _volumeMapper->Delete();
+ _volumeProperty->Delete();
+ _newvol->Delete();
+ _volumePlanes->Delete();
for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
- _tissue[i] -> Delete();
- _observerS[i] -> Delete();
+ _tissue[i]-> Delete();
+ _observerS[i]-> Delete();
}
- _observerV -> Delete();
+ _observerV-> Delete();
}
//-------------------------------------------------------------------
vtkActor* vtkClipping3DDataViewer::GetOutlineActor()
adding the poinst of the transference function
*/
//X
- greyValuesTransferenceFVector.push_back(max * 0/2);
- greyValuesTransferenceFVector.push_back(max * 1/2);
+ greyValuesTransferenceFVector.push_back(max * 0/2); // JPR ?? 0/2
+ greyValuesTransferenceFVector.push_back(max * 1/2); // JPR ?? division entiere?
greyValuesTransferenceFVector.push_back(max * 2/2);
//Y
intensityValuesTransferenceFVector.push_back(0.0);
_volumeProperty->SetColor(colortable);
-}
\ No newline at end of file
+}
//-------------------------------------------------------------------
vtkMPR3DDataViewer::~vtkMPR3DDataViewer()
{
- _outlineData -> Delete();
- _mapOutline -> Delete();
- _outline -> Delete();
-
-// if (_bwLut) _bwLut -> Delete();
-// if (_hueLut) _hueLut -> Delete();
-// if (_satLut) _satLut -> Delete();
- if (_ctfun) _ctfun -> Delete();
- if (_saggitalColors) _saggitalColors -> Delete();
- if (_saggital) _saggital -> Delete();
- if (_axialColors) _axialColors -> Delete();
- if (_axial) _axial -> Delete();
- if (_coronalColors) _coronalColors -> Delete();
- if (_coronal) _coronal -> Delete();
+ _outlineData-> Delete();
+ _mapOutline-> Delete();
+ _outline-> Delete();
+
+// if (_bwLut) _bwLut->Delete();
+// if (_hueLut) _hueLut->Delete();
+// if (_satLut) _satLut->Delete();
+ if (_ctfun) _ctfun->Delete();
+ if (_saggitalColors) _saggitalColors ->Delete();
+ if (_saggital) _saggital->Delete();
+ if (_axialColors) _axialColors->Delete();
+ if (_axial) _axial->Delete();
+ if (_coronalColors) _coronalColors->Delete();
+ if (_coronal) _coronal->Delete();
}
//-------------------------------------------------------------------
_coronalColors->SetLookupTable(colortable);
_axialColors->SetLookupTable(colortable);
}
-
\ No newline at end of file
+
**/
int wxMaracasRenderTabbedPanel::getPropId(){
return _propid;
-}
\ No newline at end of file
+}
+
void wxMaracasSuperpositionPanel::Refresh()
{
GetwxVtkMPR2DView()->GetRenWin()->Render();
- }
\ No newline at end of file
+ }
+
Program: wxMaracas
Module: $RCSfile: wxMaracasSurfaceRendering.cxx,v $
Language: C++
- Date: $Date: 2009/10/15 11:56:43 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/10/16 15:17:57 $
+ Version: $Revision: 1.2 $
Copyright: (c) 2002, 2003
License:
wxauimanager->Update();
createFileChooser();
-
-
}
wxMaracasSurfaceRendering::~wxMaracasSurfaceRendering( ){
delete _toolb;
-
}
std::string wxMaracasSurfaceRendering::getPath(){
wxMessageDialog* diag = new wxMessageDialog(this, s, s, wxICON_ERROR);
diag->ShowModal();
delete diag;
-
}
}
//}
}
delete fildial;
-
}
+
void wxMaracasSurfaceRendering::loadPropMHD(wxString filename, wxString dataname){
std::string s = std::string(filename.mb_str());
s = std::string(dataname.mb_str());
addPropMHD(img, s);
}
-
}
void wxMaracasSurfaceRendering::addPropMHD(vtkImageData* imgdata, std::string dataname){
std::cout << "Exception : " << str << '\n';
wxMessageDialog* diag = new wxMessageDialog(this, wxString( str,wxConvUTF8 ), wxString( str,wxConvUTF8 ), wxICON_ERROR);
diag->ShowModal();
-
}
}
}else{
//TODO msj to the user indicating error in file
}
-
-
-
}
void wxMaracasSurfaceRendering::addProp3D(vtkProp3D* prop3D, std::string dataname){
wxMessageDialog* diag = new wxMessageDialog(this, wxString(str,wxConvUTF8 ), wxString(str,wxConvUTF8 ), wxICON_ERROR);
diag->ShowModal();
}
-
}
void wxMaracasSurfaceRendering::addSurfaceRenderingPanel(wxMaracasSurfaceRenderingPanel* surrend, std::string dataname){
wxAuiPaneInfo paneinfo;
wxauimanager->AddPane(surrend, paneinfo.DefaultPane().Centre().DestroyOnClose().Caption(s));
wxauimanager->Update();
-
-
}
void wxMaracasSurfaceRendering::deleteActor(int propid){
}
}
-
-
-
-
/**
**
**/
ToolBar::ToolBar(wxWindow * parent,std::string iconsdir)
: wxToolBar(parent, -1, wxDefaultPosition, wxDefaultSize)
{
-
-
std::string iconfil = iconsdir;
//iconfil+= "/OpenImage.png";
_evthand = new ToolBarEventHandler();
this->SetEventHandler(_evthand);
-
}
ToolBar::~ToolBar(void){
ToolBarEventHandler::ToolBarEventHandler()
: wxEvtHandler(){
}
+
ToolBarEventHandler::~ToolBarEventHandler(){
}
}
-
BEGIN_EVENT_TABLE(ToolBarEventHandler, wxEvtHandler)
EVT_MENU(1, ToolBarEventHandler::onLoadImageFile)
END_EVENT_TABLE()
Program: wxMaracas
Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $
Language: C++
- Date: $Date: 2009/09/15 11:25:07 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2009/10/16 15:17:57 $
+ Version: $Revision: 1.18 $
Copyright: (c) 2002, 2003
License:
/*if(mwxvtkmpr3Dview!=NULL){
mwxvtkmpr3Dview->setColorLevel(level);
}*/
- }
\ No newline at end of file
+ }
+
_radio = radio;
_colour = colour;
_opacity = opacity;
-
}
_render->RemoveViewProp(_vectdata[i]->GetActor());
delete _vectdata[i];
_vectdata.pop_back();
- }
-
+ }
}
void PlaneDirectionManager::UpdateVectors()throw (std::exception){
PlaneDirectionManagerData* temp;
_render->AddViewProp (_vectdata[index]->GetActor());
}else{
_render->RemoveViewProp (_vectdata[index]->GetActor());
- }
-
- }
-
-
+ }
+ }
}
-void PlaneDirectionManager::changeColor(int index,double r,double g,double b){
+void PlaneDirectionManager::changeColor(int index,double r,double g,double b)
+{
GetPlaneDirectionManagerData(index)->ChangeColour(r,g,b);
}
-PlaneDirectionManagerData* PlaneDirectionManager::GetPlaneDirectionManagerData(int id) {
-
+PlaneDirectionManagerData* PlaneDirectionManager::GetPlaneDirectionManagerData(int id)
+{
return _vectdata[id];
}
void PlaneDirectionManager::WriteInformation(std::string filename, double* spc){
- FILE *ff;
+ FILE *ff;
ff = fopen( filename.c_str() , "w+" );
if(spc ==NULL){
spc = new double[3];
fprintf(ff,"Dir%d\n",i);
fprintf(ff,"\tP0[%f, %f, %f]\tP1[%f, %f, %f]\tP2[%f, %f, %f]\tDir[%f, %f, %f] \n",
p0x,p0y,p0z, p1x,p1y,p1z, p2x,p2y,p2z, dirx,diry,dirz);
- }
-
+ }
fclose(ff);
} else { // else ff
printf("PlaneDirectionManager::WriteInformation ...Error... creating file");
- } //ff
-
-
+ } //ff
}
void PlaneDirectionManager::SetArrowSize(int arrowsize){
_radio = arrowsize;
-}
\ No newline at end of file
+}
** Start of data viewmanagerData
*********************************************************************************************/
-PlanesOperations::PlanesOperations(){
+PlanesOperations::PlanesOperations()
+{
}
-PlanesOperations::~PlanesOperations(){
+PlanesOperations::~PlanesOperations()
+{
}
-double* PlanesOperations::getCrossProduct(double* vect0,double* vect1){
+double* PlanesOperations::getCrossProduct(double* vect0,double* vect1)
+{
double* vectCross;
vectCross = new double[3];
vectCross[0] = vect0[1]*vect1[2]-(vect0[2]*vect1[1]);
/**
** Returns the magnitud of the given vector
**/
-double PlanesOperations::getMagnitud(double* vect){
-
+double PlanesOperations::getMagnitud(double* vect)
+{
double mag;
mag = sqrt(pow(vect[0],2) + pow(vect[1],2) + pow(vect[2],2));
std::cout<<"mag "<<mag <<std::endl;
return mag;
-
}
/**
** returns the unitary vector of the given vector
** u = 1/|vect| . vect
**/
-double* PlanesOperations::getNormal(double* vect){
+double* PlanesOperations::getNormal(double* vect)
+{
double* vectnorm;
double mag = getMagnitud(vect);
vectnorm = new double[3];
-
if(mag!=0){
vectnorm[0] = vect[0]/mag;
vectnorm[1] = vect[1]/mag;
vectnorm[1] = 0;
vectnorm[2] = 0;
}
-
return vectnorm;
-
-
}
-double* PlanesOperations::makeVector(double podouble0[3], double podouble1[3]){
+double* PlanesOperations::makeVector(double podouble0[3], double podouble1[3])
+{
double *vect;
vect = new double[3];
vect[2]= podouble1[2]-podouble0[2];
return vect;
+}
-}
\ No newline at end of file