[vtkusers] Type Initialization Exception
Bertrand de Boisdeffre
bertrand.boisdeffre at gmail.com
Thu Aug 26 04:31:34 EDT 2010
Hi all,
I am going to crazy. Yesterday, my windowsForm using a RenderWindowControl
worked perfectly. This morning, when i tried to instanciate my
renderWindowControl an initialization exception was thrown.
Here was my code :
System.WindowsFormHost vtkControlHost;
private void vtkControlHost_Loaded(object sender, RoutedEventArgs e)
{
// Create the renderWindowControl
this.renderWindowControl = new RenderWindowControl();
this.renderWindowControl.Size = new
System.Drawing.Size((int)vtkControlHost.Width, (int)vtkControlHost.Height);
// renderWindowControl Event
this.renderWindowControl.Load +=new
EventHandler(this.ShowDefaultScene);
vtkControlHost.Child = this.renderWindowControl;
}
public void ShowDefaultScene(object sender, EventArgs e)
{
this.renderWindow = renderWindowControl.RenderWindow;
this.renderer =
renderWindowControl.RenderWindow.GetRenderers().GetFirstRenderer();
.....
}
Before, when renderWindowControl became the vtkControlHost Child, the method
showDefaultScene() was called. Not today, So i changed this line by
this.renderWindowControl.ParentChanged +=new
EventHandler(this.ShowDefaultScene);
Then, the method was called, but in ShowDefaultScene(), i create some actors
( vtkPolyData, vtkPolyDataMapper, vtkActor) and when i instanciate the first
vtk object (vtkPolyData) an initialization exception is thrown again.
I don't understand, I did'nt modify anything, except others files in my
global project. However, they don't have some Kitware dll as reference,
so...
Best regards.
--
Bertrand de Boisdeffre
Etudiant 2A SICOM Phelma Grenoble-INP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100826/1380dca7/attachment.htm>
More information about the vtkusers
mailing list