Commit b2a1373a authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot

Merge topic 'distance_representation_scale_fix'

333cbec1 Invert the effect of the scale factor
Acked-by: Kitware Robot's avatarKitware Robot <>
Reviewed-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <>
Merge-request: !1990
parents 67be604f 333cbec1
Pipeline #27236 canceled with stage
in 0 seconds
......@@ -97,8 +97,8 @@ public:
// will be defined in terms of the scaled space. For example, if the VTK world
// coordinates are assumed to be in inches, but the desired distance units
// should be defined in terms of centimeters, the scale factor should be set
// to 0.3937. The ruler marks will then be spaced in terms of centimeters, and
// the label will contain the measurement in centimeters.
// to 2.54. The ruler marks will then be spaced in terms of centimeters, and
// the label will show the measurement in centimeters.
......@@ -183,16 +183,14 @@ void vtkDistanceRepresentation2D::BuildRepresentation()
this->AxisActor->SetRulerDistance(this->RulerDistance * this->Scale);
double scaledDistance = this->Distance;
if (this->Scale != 0.0)
scaledDistance /= this->Scale;
this->AxisActor->SetRulerDistance(this->RulerDistance / this->Scale);
char string[512];
sprintf(string, this->LabelFormat, scaledDistance);
sprintf(string, this->LabelFormat, this->Distance * this->Scale);
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