Commit a9cf8672 authored by jcfr's avatar jcfr

COMP: Markups/VTKWidgets: Fix -Wunused-parameter and -Wunused-variable warnings

git-svn-id: http://svn.slicer.org/Slicer4/trunk@27987 3bd1e089-480b-0410-8dfb-8563597acbee
parent 98d1fe02
......@@ -177,7 +177,7 @@ bool vtkSlicerAbstractWidget::ProcessControlPointMove(vtkMRMLInteractionEventDat
}
//-------------------------------------------------------------------------
bool vtkSlicerAbstractWidget::ProcessControlPointInsert(vtkMRMLInteractionEventData* eventData)
bool vtkSlicerAbstractWidget::ProcessControlPointInsert(vtkMRMLInteractionEventData* vtkNotUsed(eventData))
{
// Can be implemented in derived classes
return false;
......@@ -300,7 +300,7 @@ bool vtkSlicerAbstractWidget::ProcessMouseMove(vtkMRMLInteractionEventData* even
}
//-------------------------------------------------------------------------
bool vtkSlicerAbstractWidget::ProcessEndMouseDrag(vtkMRMLInteractionEventData* eventData)
bool vtkSlicerAbstractWidget::ProcessEndMouseDrag(vtkMRMLInteractionEventData* vtkNotUsed(eventData))
{
if (!this->WidgetRep)
{
......@@ -323,7 +323,7 @@ bool vtkSlicerAbstractWidget::ProcessEndMouseDrag(vtkMRMLInteractionEventData* e
}
//-------------------------------------------------------------------------
bool vtkSlicerAbstractWidget::ProcessWidgetReset(vtkMRMLInteractionEventData* eventData)
bool vtkSlicerAbstractWidget::ProcessWidgetReset(vtkMRMLInteractionEventData* vtkNotUsed(eventData))
{
vtkMRMLMarkupsNode* markupsNode = this->GetMarkupsNode();
if (!markupsNode)
......@@ -335,7 +335,7 @@ bool vtkSlicerAbstractWidget::ProcessWidgetReset(vtkMRMLInteractionEventData* ev
}
//-------------------------------------------------------------------------
bool vtkSlicerAbstractWidget::ProcessControlPointDelete(vtkMRMLInteractionEventData* eventData)
bool vtkSlicerAbstractWidget::ProcessControlPointDelete(vtkMRMLInteractionEventData* vtkNotUsed(eventData))
{
if (this->WidgetState != Define && this->WidgetState != OnWidget)
{
......@@ -368,7 +368,7 @@ bool vtkSlicerAbstractWidget::ProcessControlPointDelete(vtkMRMLInteractionEventD
}
//-------------------------------------------------------------------------
bool vtkSlicerAbstractWidget::ProcessWidgetJumpCursor(vtkMRMLInteractionEventData* eventData)
bool vtkSlicerAbstractWidget::ProcessWidgetJumpCursor(vtkMRMLInteractionEventData* vtkNotUsed(eventData))
{
if (this->WidgetState != OnWidget || !this->MousePressedSinceMarkupPlace)
{
......@@ -396,7 +396,7 @@ bool vtkSlicerAbstractWidget::ProcessWidgetJumpCursor(vtkMRMLInteractionEventDat
//-------------------------------------------------------------------------
bool vtkSlicerAbstractWidget::ConvertDisplayPositionToWorld(const int displayPos[2],
double worldPos[3], double worldOrientationMatrix[9], double* refWorldPos/*=nullptr*/)
double worldPos[3], double vtkNotUsed(worldOrientationMatrix)[9], double* refWorldPos/*=nullptr*/)
{
vtkSlicerAbstractWidgetRepresentation2D* rep2d = vtkSlicerAbstractWidgetRepresentation2D::SafeDownCast(this->WidgetRep);
vtkSlicerAbstractWidgetRepresentation3D* rep3d = vtkSlicerAbstractWidgetRepresentation3D::SafeDownCast(this->WidgetRep);
......@@ -896,7 +896,6 @@ void vtkSlicerAbstractWidget::ScaleWidget(double eventPos[2])
}
displayPos[0] = eventPos[0];
displayPos[1] = eventPos[1];
double r2 = vtkMath::Distance2BetweenPoints(ref, center);
if (!this->WidgetRep->GetPointPlacer()->ComputeWorldPosition(this->Renderer,
displayPos, ref, worldPos,
......@@ -1140,7 +1139,6 @@ int vtkSlicerAbstractWidget::AddNodeOnWidget(const int displayPos[2])
return 0;
}
double orientation[4] = { 0.0 };
if (!this->WidgetRep->GetPointPlacer()->ComputeWorldPosition(this->Renderer,
displayPosDouble, closestPosWorld, worldPos, worldOrient))
{
......@@ -1244,7 +1242,7 @@ bool vtkSlicerAbstractWidget::IsPointPreviewed()
}
//---------------------------------------------------------------------------
const char* vtkSlicerAbstractWidget::GetAssociatedNodeID(vtkMRMLInteractionEventData* eventData)
const char* vtkSlicerAbstractWidget::GetAssociatedNodeID(vtkMRMLInteractionEventData* vtkNotUsed(eventData))
{
if (!this->WidgetRep)
{
......
......@@ -548,8 +548,8 @@ void vtkSlicerAbstractWidgetRepresentation::AddActorsBounds(vtkBoundingBox& boun
//-----------------------------------------------------------------------------
void vtkSlicerAbstractWidgetRepresentation::CanInteract(
const int displayPosition[2], const double position[3],
int &foundComponentType, int &foundComponentIndex, double &closestDistance2)
const int vtkNotUsed(displayPosition)[2], const double vtkNotUsed(position)[3],
int &foundComponentType, int &vtkNotUsed(foundComponentIndex), double &vtkNotUsed(closestDistance2))
{
foundComponentType = vtkMRMLMarkupsDisplayNode::ComponentNone;
}
......@@ -648,7 +648,8 @@ void vtkSlicerAbstractWidgetRepresentation::BuildLine(vtkPolyData* linePolyData,
}
//----------------------------------------------------------------------
void vtkSlicerAbstractWidgetRepresentation::UpdateFromMRML(vtkMRMLNode* caller, unsigned long event, void *callData)
void vtkSlicerAbstractWidgetRepresentation::UpdateFromMRML(
vtkMRMLNode* vtkNotUsed(caller), unsigned long event, void *vtkNotUsed(callData))
{
if (!event || event == vtkMRMLTransformableNode::TransformModifiedEvent)
{
......
......@@ -262,8 +262,6 @@ void vtkSlicerAbstractWidgetRepresentation2D::UpdateAllPointsAndLabelsFromMRML(d
}
double slicePos[3] = { 0.0 };
double worldOrient[9] = { 0.0 };
double orientation[4] = { 0.0 };
this->GetNthNodeDisplayPosition(pointIndex, slicePos);
controlPoints->ControlPoints->InsertNextPoint(slicePos);
......@@ -414,7 +412,7 @@ void vtkSlicerAbstractWidgetRepresentation2D::UpdateFromMRML(vtkMRMLNode* caller
//----------------------------------------------------------------------
void vtkSlicerAbstractWidgetRepresentation2D::CanInteract(
const int displayPosition[2], const double position[3],
const int displayPosition[2], const double vtkNotUsed(position)[3],
int &foundComponentType, int &foundComponentIndex, double &closestDistance2)
{
foundComponentType = vtkMRMLMarkupsDisplayNode::ComponentNone;
......@@ -450,7 +448,6 @@ void vtkSlicerAbstractWidgetRepresentation2D::CanInteract(
}
vtkIdType numberOfPoints = markupsNode->GetNumberOfControlPoints();
double sliceCoordinates[4], worldCoordinates[4];
double pointDisplayPos[4] = { 0.0, 0.0, 0.0, 1.0 };
double pointWorldPos[4] = { 0.0, 0.0, 0.0, 1.0 };
......@@ -477,7 +474,7 @@ void vtkSlicerAbstractWidgetRepresentation2D::CanInteract(
//----------------------------------------------------------------------
void vtkSlicerAbstractWidgetRepresentation2D::CanInteractWithLine(
const int displayPosition[2], const double worldPosition[3],
const int displayPosition[2], const double vtkNotUsed(worldPosition)[3],
int &foundComponentType, int &foundComponentIndex, double &closestDistance2)
{
foundComponentType = vtkMRMLMarkupsDisplayNode::ComponentNone;
......@@ -495,7 +492,6 @@ void vtkSlicerAbstractWidgetRepresentation2D::CanInteractWithLine(
double pixelTolerance2 = this->PixelTolerance * this->PixelTolerance;
vtkIdType numberOfPoints = markupsNode->GetNumberOfControlPoints();
double sliceCoordinates[4], worldCoordinates[4];
double pointDisplayPos1[4] = { 0.0, 0.0, 0.0, 1.0 };
double pointWorldPos1[4] = { 0.0, 0.0, 0.0, 1.0 };
......
......@@ -158,7 +158,7 @@ vtkSlicerAbstractWidgetRepresentation3D::~vtkSlicerAbstractWidgetRepresentation3
}
//----------------------------------------------------------------------
void vtkSlicerAbstractWidgetRepresentation3D::UpdateNthPointAndLabelFromMRML(int n)
void vtkSlicerAbstractWidgetRepresentation3D::UpdateNthPointAndLabelFromMRML(int vtkNotUsed(n))
{
/*
TODO: implement this for better performance
......@@ -282,7 +282,7 @@ void vtkSlicerAbstractWidgetRepresentation3D::UpdateAllPointsAndLabelsFromMRML()
//----------------------------------------------------------------------
void vtkSlicerAbstractWidgetRepresentation3D::CanInteract(
const int displayPosition[2], const double worldPosition[3],
const int displayPosition[2], const double vtkNotUsed(worldPosition)[3],
int &foundComponentType, int &foundComponentIndex, double &closestDistance2)
{
foundComponentType = vtkMRMLMarkupsDisplayNode::ComponentNone;
......@@ -316,11 +316,6 @@ void vtkSlicerAbstractWidgetRepresentation3D::CanInteract(
}
vtkIdType numberOfPoints = markupsNode->GetNumberOfControlPoints();
double displayCoordinates[4], worldCoordinates[4];
double pointDisplayPos[4] = { 0.0, 0.0, 0.0, 1.0 };
double pointWorldPos[4] = { 0.0, 0.0, 0.0, 1.0 };
for (int i = 0; i < numberOfPoints; i++)
{
if (!markupsNode->GetNthControlPointVisibility(i))
......@@ -360,7 +355,7 @@ void vtkSlicerAbstractWidgetRepresentation3D::CanInteract(
//----------------------------------------------------------------------
void vtkSlicerAbstractWidgetRepresentation3D::CanInteractWithLine(
const int displayPosition[2], const double worldPosition[3],
const int vtkNotUsed(displayPosition)[2], const double worldPosition[3],
int &foundComponentType, int &foundComponentIndex, double &closestDistance2)
{
foundComponentType = vtkMRMLMarkupsDisplayNode::ComponentNone;
......@@ -652,7 +647,7 @@ bool vtkSlicerAbstractWidgetRepresentation3D::AccuratePick(int x, int y, double
}
vtkPoints* pickPositions = this->AccuratePicker->GetPickedPositions();
int numberOfPickedPositions = pickPositions->GetNumberOfPoints();
vtkIdType numberOfPickedPositions = pickPositions->GetNumberOfPoints();
if (numberOfPickedPositions<1)
{
return false;
......@@ -663,7 +658,7 @@ bool vtkSlicerAbstractWidgetRepresentation3D::AccuratePick(int x, int y, double
this->Renderer->GetActiveCamera()->GetPosition(cameraPosition);
pickPositions->GetPoint(0, pickPoint);
double minDist2 = vtkMath::Distance2BetweenPoints(pickPoint, cameraPosition);
for (int i = 1; i<numberOfPickedPositions; i++)
for (vtkIdType i = 1; i < numberOfPickedPositions; i++)
{
double currentMinDist2 = vtkMath::Distance2BetweenPoints(pickPositions->GetPoint(i), cameraPosition);
if (currentMinDist2<minDist2)
......
......@@ -258,7 +258,6 @@ void vtkSlicerAngleRepresentation2D::CanInteract(
double pixelTolerance2 = this->PixelTolerance * this->PixelTolerance;
vtkIdType numberOfPoints = markupsNode->GetNumberOfControlPoints();
double sliceCoordinates[4], worldCoordinates[4];
double pointDisplayPos1[4] = { 0.0, 0.0, 0.0, 1.0 };
double pointWorldPos1[4] = { 0.0, 0.0, 0.0, 1.0 };
......
......@@ -75,7 +75,7 @@ void vtkSlicerClosedCurveWidget::CreateDefaultRepresentation(
}
//----------------------------------------------------------------------
void vtkSlicerClosedCurveWidget::AddPointOnCurveAction(vtkAbstractWidget *w)
void vtkSlicerClosedCurveWidget::AddPointOnCurveAction(vtkAbstractWidget *vtkNotUsed(w))
{
/* TODO: implement this
......
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