<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">Yes, since </span><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">vtkITKImageFilter is the base class of both plugins, it appears in </span><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">ADD_PARAVIEW_PLUGIN() from both of them.</span><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 6, 2014 at 2:27 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes vtkITKImageFilter sounds like the class being wrapped twice. Is<br>
vtkITKImageFilter.cxx added to both the plugins in<br>
ADD_PARAVIEW_PLUGIN() call?<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, May 6, 2014 at 11:45 AM, Joe Ping-Lin Hsiao <<a href="mailto:phsiao@cs.unc.edu">phsiao@cs.unc.edu</a>> wrote:<br>
> I am not sure if this is the wrapped class that you mentioned, but I checked<br>
> the code,<br>
><br>
> within the CMake of the base class (vtkITKImageFilter), there is<br>
><br>
> VTK_WRAP_ClientServer("ITKImageFilter"<br>
> ParaViewITKPluginsWrappedSrcs "${ParaViewITKPluginsCommonSrcs}"<br>
> )<br>
><br>
> and in the base class' header, there are a bunch of //BTX and //ETX securing<br>
> ITK declarations.<br>
><br>
> Within the pluings' headers, there are also a bunch of //BTX and //ETX<br>
> surrounding ITK code.<br>
><br>
> I tried disabling them all above, but still get the same error.<br>
><br>
><br>
> One thing I noticed is that in Visual Studio under the projects of both<br>
> plugins, there is a vtkITKImageFilterClientServer.cxx created by ParaView.<br>
> Could this be the duplicate copy of class?<br>
><br>
><br>
> On Tue, May 6, 2014 at 8:58 AM, Utkarsh Ayachit<br>
> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>><br>
>> Is it possible that both of the plugins have some wrapped class that<br>
>> is duplicated in the two?<br>
>><br>
>> On Mon, May 5, 2014 at 1:32 PM, Joe Ping-Lin Hsiao <<a href="mailto:phsiao@cs.unc.edu">phsiao@cs.unc.edu</a>><br>
>> wrote:<br>
>> > I am having trouble loading my custom plugins, which have an internal<br>
>> > ITK<br>
>> > pipeline. Everything works fine if I only load one of them. As soon as I<br>
>> > load a second one, the program crashes. The error message I get from<br>
>> > debug<br>
>> > mode is<br>
>> ><br>
>> > Unhandled exception at 0x000007feeb86275d (vtkClientServer-pv4.1.dll) in<br>
>> > ImageSurfer2.exe: 0xC0000005: Access violation reading location<br>
>> > 0x0000000000000000.<br>
>> ><br>
>> ><br>
>> > The call stack:<br>
>> ><br>
>> > vtkClientServer-pv4.1.dll!std::operator<<<std::char_traits<char><br>
>> >>(std::basic_ostream<char,std::char_traits<char> > & _Ostr={...}, const<br>
>> >> char<br>
>> > * _Val=0x000007feeb8aaec8) Line 747 + 0x8 bytes C++<br>
>> ><br>
>> >><br>
>> >><br>
>> >> vtkClientServer-pv4.1.dll!vtkClientServerInterpreter::AddNewInstanceFunction(const<br>
>> >> char * name=0x000007feed4920d0, vtkObjectBase * (void *)*<br>
>> >> f=0x000007feed301cfd, void * ctx=0x0000000000000000, void (void *)*<br>
>> >> freeFunction=0x0000000000000000) Line 851 + 0x1b bytes C++<br>
>> ><br>
>> > Hessian3DToVesselnessMeasureImageFilter.dll!000007feed34e8c2()<br>
>> ><br>
>> > [Frames below may be incorrect and/or missing, no symbols loaded for<br>
>> > Hessian3DToVesselnessMeasureImageFilter.dll]<br>
>> ><br>
>> > 000000000480f170()<br>
>> ><br>
>> > Hessian3DToVesselnessMeasureImageFilter.dll!000007feed4920d0()<br>
>> ><br>
>> > Hessian3DToVesselnessMeasureImageFilter.dll!000007feed301cfd()<br>
>> ><br>
>> ><br>
>> ><br>
>> > Here is my class hierarchy:<br>
>> ><br>
>> ><br>
>> > vtkITKImageFilter -> class inherits from vtkImageAlgorithm. Use<br>
>> > vtkImageExport, itk::VTKImageImport, itk::VTKImageExport, and<br>
>> > vtkImageImport<br>
>> > inside to convert between VTK and ITK.<br>
>> ><br>
>> ><br>
>> > MyITKFilter -> my ITK plugin inheriting from vtkITKImageFilter.<br>
>> ><br>
>> ><br>
>> ><br>
>> > I include source code from both classes in CMake:<br>
>> ><br>
>> ><br>
>> > ADD_PARAVIEW_PLUGIN(${PLUGIN} 1.0<br>
>> ><br>
>> > SERVER_MANAGER_XML ${XML}<br>
>> ><br>
>> > SERVER_MANAGER_SOURCES vtkHessian3DToVesselnessMeasureImageFilter.cxx<br>
>> > ../Common/vtkITKImageFilter.cxx<br>
>> ><br>
>> > SOURCES ${XML}<br>
>> ><br>
>> > )<br>
>> ><br>
>> ><br>
>> > and link the plugin with ITK<br>
>> ><br>
>> ><br>
>> > TARGET_LINK_LIBRARIES(${PLUGIN} ${ITK_LIBRARIES})<br>
>> ><br>
>> ><br>
>> > ITK was built in static.<br>
>> ><br>
>> ><br>
>> > Any idea what might cause the trouble?<br>
>> ><br>
>> ><br>
>> ><br>
>> > Thanks,<br>
>> ><br>
>> > Joe<br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > Paraview-developers mailing list<br>
>> > <a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
>> > <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>