Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 3191e4ce authored by saubatn's avatar saubatn
Browse files

FIXED Story 109 : Change methods signatures involving arrays with pointor...

FIXED Story 109 : Change methods signatures involving arrays with pointor instead. This step is a preparation for the Python binding and cannot be done using Shiboken typesystem.xml description file (see : https://bugreports.qt-project.org/browse/PYSIDE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel).

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@1138 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 94afb17c
......@@ -404,7 +404,7 @@ void Component::getActorColor ( InterfaceGeometry::RenderingModes m, double d[4]
}
// -------------------- getBounds --------------------
void Component::getBounds ( double bounds[6] ) {
void Component::getBounds ( double *bounds ) {
invoke1 ( myGeometry, getBounds, bounds )
else {
bounds[0] = bounds[2] = bounds[4] = 0.0;
......
......@@ -579,7 +579,7 @@ public:
// --
/// compute the object's bounding box [xmin,xmax, ymin,ymax, zmin,zmax], see Component.cpp
virtual void getBounds(double bounds[6]);
virtual void getBounds(double *bounds);
/** compute the object's bounding sphere radius, @see Component.cpp
* @return the bounding radius of the Geometry or -1 if there is no Geometry
......
......@@ -428,7 +428,7 @@ void Geometry::setPointPosition(const unsigned int orderNumber, const double x,
}
//------------------------------- setActorColor ----------------------------------------
void Geometry::setActorColor(const RenderingModes mode, double color[4]) {
void Geometry::setActorColor(const RenderingModes mode, double *color) {
if (mode & InterfaceGeometry::Surface) {
for (unsigned int i = 0;i < 4; i++)
surfaceColor[i] = color[i];
......@@ -469,7 +469,7 @@ void Geometry::setActorColor(const RenderingModes mode, const double r, const do
}
//------------------------------- getActorColor ----------------------------------------
void Geometry::getActorColor(const RenderingModes mode, double color[4]) {
void Geometry::getActorColor(const RenderingModes mode, double *color) {
if (mode & InterfaceGeometry::Surface) {
for (unsigned int i = 0;i < 4;i++)
color[i] = surfaceColor[i];
......@@ -683,7 +683,7 @@ void Geometry::setLinesAsTubes(bool isTubes) {
}
// -------------------- getBounds --------------------
void Geometry::getBounds(double bounds[6]) {
void Geometry::getBounds(double *bounds) {
pointSet->GetBounds(bounds);
}
......
......@@ -214,7 +214,7 @@ class CAMITK_API Geometry : public InterfaceGeometry {
/// @{
/// compute the object's bounding box [xmin,xmax, ymin,ymax, zmin,zmax]
virtual void getBounds(double bounds[6]);
virtual void getBounds(double *bounds);
/// compute the object's bounding sphere radius
virtual double getBoundingRadius();
......@@ -241,13 +241,13 @@ class CAMITK_API Geometry : public InterfaceGeometry {
virtual const EnhancedModes getEnhancedModes() const { return enhancedModes; }
/// Set the color of given representation modes.
virtual void setActorColor(const RenderingModes, double [4]);
virtual void setActorColor(const RenderingModes, double*);
/// Set the color of given representation modes.
virtual void setActorColor(const RenderingModes, const double, const double, const double);
/// Get the color of given representation modes in the second parameter, i.e. double[4] (r,g,b,a)
virtual void getActorColor(const RenderingModes, double [4]);
virtual void getActorColor(const RenderingModes, double*);
/// Set an (r,g,b) color to all representation modes, without changing the opacity.
virtual void setColor(const double, const double, const double);
......
......@@ -330,7 +330,7 @@ void Slice::pixelPicked(double x, double y, double z) {
}
void Slice::reslicedToVolumeCoords(const double ijk[3], double xyz[3]) {
void Slice::reslicedToVolumeCoords(const double *ijk, double *xyz) {
// At this point, coordinates are expressed in reslice frame NOT in real frame.
double localPoint[4];
double realPoint[4];
......@@ -348,7 +348,7 @@ void Slice::reslicedToVolumeCoords(const double ijk[3], double xyz[3]) {
xyz[2] = realPoint[2];
}
void Slice::volumeToReslicedCoords(const double xyz[3], double ijk[3]) {
void Slice::volumeToReslicedCoords(const double *xyz, double *ijk) {
// At this point, coordinates are expressed in original frame NOT in real frame.
double realPoint[4];
double localPoint[4];
......
......@@ -149,9 +149,9 @@ public:
* volume coordinates computed from the input
*/
/// Todo: put this method in abstract slice
void reslicedToVolumeCoords(const double ijk[3], double xyz[3]);
void reslicedToVolumeCoords(const double *ijk, double *xyz);
/// Todo, idem...
void volumeToReslicedCoords(const double xyz[3], double ijk[3]);
void volumeToReslicedCoords(const double *xyz, double *ijk);
virtual void updatePickPlane();
......@@ -229,14 +229,16 @@ protected:
/** Sets the given rotation transformation to the reslicer without
* checking anything
* WARNING : This method is not implemented
*/
void setTransformOrientation(double xCosines[3], double yCosines[3], double zCosines[3]);
void setTransformOrientation(double *xCosines, double *yCosines, double *zCosines);
/** Sets the given origin to the reslicer without checking anything.
* Warning, if the origin is not at (0,0,s) or any combination, the
* pickPlane may not be correctly placed.
* WARNING : This method is not implemented
*/
void setTransformOrigin(double resliceOrigin[3]);
void setTransformOrigin(double *resliceOrigin);
/** Initialize actors and everything they need.*/
void initActors();
......
......@@ -131,7 +131,7 @@ vtkSmartPointer<vtkActor> PlaneC::getActor() {
}
//--------------------Initialize a plane with PlaneCtype axis as normal----------
void PlaneC::init(PlaneC::PlaneCType type, double bounds[6]){
void PlaneC::init(PlaneC::PlaneCType type, double *bounds){
setOrigin(bounds[0], bounds[2], bounds[4]);
......@@ -326,7 +326,7 @@ void PlaneC ::rotationAxe2() {
}
//--------------------Set the transformation---------------------
void PlaneC ::setTransfoPercentToRealValue(double tab[3], double min, double max) {
void PlaneC ::setTransfoPercentToRealValue(double *tab, double min, double max) {
for (int i = 0;i < 3;i++)
transfor[i] = tab[i];
translat = transfor[0] * (max - min) / 100;
......@@ -346,13 +346,13 @@ void PlaneC::setTranslationMaxInPercent(double trans) {
}
//--------------------Get the origin---------------------
void PlaneC::getOrigin(double tab[3]) {
void PlaneC::getOrigin(double *tab) {
plane->GetOrigin(tab);
}
//--------------------Get the normal---------------------
void PlaneC::getNormal(double tab[3]) {
void PlaneC::getNormal(double *tab) {
plane->GetNormal(tab);
}
......
......@@ -68,7 +68,7 @@ class PlaneC
* @param bounds an array of 6 doubles representing the bounding box (the six values have
to be put in the correct order : xmin, ymin, zmin, xmax, ymax, zmax)
*/
void init(PlaneCType type, double bounds[6]);
void init(PlaneCType type, double *bounds);
/**Visualization of the plane in wireframe*/
void setVisuPlane();
/**Visualization of the plane in red tone */
......@@ -91,7 +91,7 @@ class PlaneC
vtkSmartPointer<vtkActor> getActor();
/// set the transformation (translation, rot1 and rot2)and convert percentage to real value
void setTransfoPercentToRealValue(double tab[3], double, double);
void setTransfoPercentToRealValue(double *tab, double, double);
/// set the translation value of the plane max to 100%
void setTranslationMaxInPercent(double);
/// get the transformation (translation, rot1 and rot2) in percentage
......@@ -107,9 +107,9 @@ class PlaneC
*/
void setYAxisPoint(double, double, double);
///get the origin of the plane
void getOrigin(double tab[3]);
void getOrigin(double *tab);
///get the normal of the plane
void getNormal(double tab[3]);
void getNormal(double *tab);
......
......@@ -1351,12 +1351,12 @@ bool InteractiveViewer::getGradientBackground() const {
}
//--------------------- getBounds -------------------
void InteractiveViewer::getBounds(double bounds[6]) {
void InteractiveViewer::getBounds(double *bounds) {
rendererWidget->computeVisiblePropBounds(bounds);
}
//--------------------- getBoundsOfSelected -------------------
void InteractiveViewer::getBoundsOfSelected(double bounds[6]) {
void InteractiveViewer::getBoundsOfSelected(double *bounds) {
// booleen which allows to know if at least 1 element is selected
bool oneElementSelected = false;
......
......@@ -341,10 +341,10 @@ public:
void initPicking ( PickingMode );
/// Compute the bounding box of the selected elements [xmin,xmax, ymin,ymax, zmin,zmax]
void getBoundsOfSelected ( double bound[6] );
void getBoundsOfSelected ( double *bound );
/// Compute the bounding box of all displayed Component
void getBounds ( double bound[6] );
void getBounds ( double *bound );
/// set the slice viewer side bar+screenshot button visibility
void setSideFrameVisible(bool);
......
......@@ -833,7 +833,7 @@ void RendererWidget::actorTransform(vtkSmartPointer<vtkActor> actor, double *box
}
// ----------------------- computeVisiblePropBounds -----------------------
void RendererWidget::computeVisiblePropBounds(double bounds[6]) {
void RendererWidget::computeVisiblePropBounds(double *bounds) {
renderer->ComputeVisiblePropBounds(bounds);
}
......@@ -927,7 +927,7 @@ void RendererWidget::resetCamera() {
update();
}
void RendererWidget::resetCamera(double bounds[6]) {
void RendererWidget::resetCamera(double *bounds) {
resetCameraSettings();
// set the proper bound
......@@ -967,7 +967,7 @@ void RendererWidget::resetCameraSettings() {
}
// --------------------- getCameraSettings ----------------------
void RendererWidget::getCameraSettings(double position[3], double focalPoint[3], double viewUp[3]) {
void RendererWidget::getCameraSettings(double *position, double *focalPoint, double *viewUp) {
vtkSmartPointer<vtkCamera> cam = renderer->GetActiveCamera();
cam->GetPosition(position);
......
......@@ -232,10 +232,10 @@ public :
void resetCamera();
/// reset the camera to the default position, default FOV and use the given bounds to focus on
void resetCamera(double bounds[6]);
void resetCamera(double *bounds);
/// get camera settings information (position, what is looked at and how) in world coordinates
void getCameraSettings(double position[3], double focalPoint[3], double viewUp[3]);
void getCameraSettings(double *position, double *focalPoint, double *viewUp);
/// set active camera
void setActiveCamera( vtkCamera * cam );
......@@ -288,7 +288,7 @@ public :
void setColorScaleTitle(QString t);
/// get the bounding box of all visible actors [xmin,xmax, ymin,ymax, zmin,zmax]
void computeVisiblePropBounds(double bounds[6]);
void computeVisiblePropBounds(double *bounds);
///@}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment