title: SetWidth() and SetHeight() in vtkActor2D causes a crash after a rendering call
body: <p>I'm trying to overlay text on an image in vtk when a certain button is clicked. I use a <code>vtkTextActor</code>, <code>vtkTextRepresentation</code>, and <code>vtkTextWidget</code> to achieve this.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>// set up actor
  textActor-&gt;SetInput(label.toStdString().c_str());
  textActor-&gt;GetTextProperty()-&gt;SetColor(1.0, 0.0, 0.0);
  
  // set location of widget
  textRepresentation-&gt;GetPositionCoordinate()-&gt;SetCoordinateSystemToWorld();
  textRepresentation-&gt;GetPositionCoordinate()-&gt;SetValue(200,200);
  
  // set up widget
  textWidget-&gt;SetInteractor(imageInteractor);
  textWidget-&gt;SetRepresentation(textRepresentation);
  textWidget-&gt;SetDefaultRenderer(rend);
  textWidget-&gt;SetTextActor(textActor);
  textWidget-&gt;SelectableOff();
  
  // render widget
  rend-&gt;GetRenderWindow()-&gt;Render();
  textWidget-&gt;On();
  textWidget-&gt;GetTextActor()-&gt;SetWidth(vc[0]);
  textWidget-&gt;GetTextActor()-&gt;SetHeight(vc[1]);
  rend-&gt;GetRenderWindow()-&gt;Render(); // crash
  </code></pre>
  
  <p>If I comment out the <code>SetWidth</code> and <code>SetHeight</code> function calls, the program works fine and the text widget pops up rather small. However when I try to adjust the width and height of <code>textActor</code> it crashes during the render call. Note that <code>vc[0]</code> and <code>vc[1]</code> are relative to the viewport coordinate system, I calculate them in a different function.</p>
  
  <p>I can adjust the width and height of <code>textActor</code> BEFORE the <code>textWidget-&gt;On()</code> call, and the widget will still pop up, but it ignores my width and height changes. I cannot seem to change the box dimensions programatically. Am I doing something wrong or is this a vtk bug?</p>
  
  <p>Here is an example.  I'd like the text to appear bigger (changing the font size wont work, I think its because the actor itself is too small).</p>
  
  <p><a href="https://i.stack.imgur.com/xetGW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xetGW.png" alt="example"></a></p>
  
  <p><strong><em>UPDATE</em></strong>
  I have not figured out why its crashing or how to fix it. As a workaround, I've been adjusting the <code>Position2Coordinate</code> value in my <code>textRepresentation</code>. The rendering call seems to be readjusting my set values. Can anyone explain why or how to fix this?</p>