Hello,<div><br></div><div>I am displaying multiple lines. Each line has its own depth value. Displaying line is working fine. I also have to display depth values on these lines. In order to do this, I am using </div><div><br>
</div><div>vtkDynamic2DLabelMapper </div><div><br></div><div>Object. I am able to produce the output with the following code</div><div><br></div><div>bathyValueMapper = vtkDynamic2DMapper::New();</div><div>bathyValueMapper ->SetLabelFormat("%-#6.3g");<br>
</div><div>bathyValueMapper ->SetInputConnection( this->translateFilter->GetOutputPort());<br></div><div>bathyValueMapper ->SetLabelModeToLabelScalars();<br></div><div><br></div><div>labelActor = vtkActor2D::New();</div>
<div>labelActor->SetMapper(bathyValueMapper);</div><div><br></div><div><br></div><div>Now there is a case where a terrain is translated and rotated, in which case the lines indicating depths also should be translated and rotated. ( that's the reason why translateFilter's output is set as input in above piece of code)</div>
<div><br></div><div>The code to display polylines is</div><div><br></div><div>vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();</div><div>mapper->SetInputConnection(this->translateFilter->GetOutputPort());</div>
<div><br></div><div>bathyActor = vtkActor::New();</div><div>bathyActor->SetMapper(mapper);</div><div><br></div><div>Since the translation part is done above using translateFilter, the rotation is done as</div><div><br>
</div><div>bathyActor->SetOrigin(rot_point[0], rot_point[1], 0);</div><div>bathyActor->RotateZ(rotAngle);</div><div><br></div><div>When I do this, the lines are translated and rotated correcly. But the depth values are only translated(as input is coming from translate filter), but not rotated.</div>
<div><br></div><div>I tried using the following code too</div><div><br></div><div>vtkTransform *rotateTransform = vtkTransform::New();</div><div>rotateTransform->RotateZ(rot_angle);</div><div><br></div><div>bathyValueMapper ->SetTransform(m_rotateTransform);<br>
</div><div><br></div><div>Even with this code, the output is same, i.e. lines are translated and rotated, but labels are only translated but not rotated. What can I do to display depth values rotated?</div><div><br></div>
<div>I want the output as shown in the attached file. The orientation of the labels must be same as that of the lines. Right now they are mismatching.</div><div><br></div><div>Thanks in advance</div><div><br></div><div>Regards</div>
<div>Rakesh Patil</div><div><br></div>