Hi,
a little update. I can build the solution if I comment the
"MITK_CORE_EXPORT" out in "AffineSurfaceInteractor.cpp".
The problem is now the exception if i try to use the interactor:
"Unhandled exception at 0x01482691 (mitkCore.dll) in MainApp.exe:
0xC0000005: Access violation reading location 0x00000068." thrown out of
the xtree class, line 1325.
Roman.
Roman Tulchiner wrote:
> Hallo,
>
> for my work it is necessary to apply an affine transformation by a
> user interaction on the "DataTreeNode" containing an "vtkPolyData"
> surface. I have tried it with the "mitkAffineInteractor", which
> satisfy my needs quite good except for scaling. I just need the
> surface to be scaled in all spatial directions at the same time,
> making the surface bigger or smaller. Instead of that, the
> AffineInteractor is scaling relative to the mouse movement direction.
>
> So now I try to define my own "AffineSurfaceInteractor" which is quite
> the same as "mitkAffineInteractor" but with adapted "AcSCALE" case in
> the ...ExecuteAction(...) operation. I will also reuse the same
> StateMaschine as used for "mitkAffineInteractor". Then I have created
> an AffineSurfaceInteractor.h and AffineSurfaceInteractor.cpp and
> registered this .cpp file in "files.cmake" in my QFunctionality
> folder. Because of the very little changes needed in comparison to
> "mitkAffineInteractor" the new AffineSurfaceInteractor files have
> nearly the same content (see the Attachment). I have also called CMake
> to register this new interactor.
>
> Now if I try to build the solution with VisualStudio2008 I get the
> following linker errors:
> ...
> 1>Generating Code...
> 1>Linking...
> 1> Creating library
> F:\MITK\build\bin\Debug\MedIAModelBasedSegmentation.lib and object
> F:\MITK\build\bin\Debug\MedIAModelBasedSegmentation.exp
> 1>MedIAModelBasedSegmentation.obj : error LNK2019: unresolved external
> symbol "__declspec(dllimport) public: static class
> itk::SmartPointer<class mitk::AffineSurfaceInteractor> __cdecl
> mitk::AffineSurfaceInteractor::New(char const *,class
> mitk::DataTreeNode *)"
> ([EMAIL PROTECTED]@mitk@@[EMAIL PROTECTED]@mitk@@@itk@@[EMAIL PROTECTED]@@Z)
> referenced in function "protected: void __thiscall
> MedIAModelBasedSegmentation::ManualSegmentationToSurface(class
> mitk::Image *)"
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@@Z)
>
> 1>AffineSurfaceInteractor.obj : error LNK2019: unresolved external
> symbol "__declspec(dllimport) const
> mitk::AffineSurfaceInteractor::`vftable'{for `mitk::XMLIO'}"
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@) referenced in
> function "protected: __thiscall
> mitk::AffineSurfaceInteractor::AffineSurfaceInteractor(char const
> *,class mitk::DataTreeNode *)"
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@1@@Z)
> 1>AffineSurfaceInteractor.obj : error LNK2019: unresolved external
> symbol "__declspec(dllimport) const
> mitk::AffineSurfaceInteractor::`vftable'{for `mitk::OperationActor'}"
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@)
> referenced in function "protected: __thiscall
> mitk::AffineSurfaceInteractor::AffineSurfaceInteractor(char const
> *,class mitk::DataTreeNode *)"
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@1@@Z)
> 1>AffineSurfaceInteractor.obj : error LNK2019: unresolved external
> symbol "__declspec(dllimport) const
> mitk::AffineSurfaceInteractor::`vftable'{for `itk::Object'}"
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@@) referenced
> in function "protected: __thiscall
> mitk::AffineSurfaceInteractor::AffineSurfaceInteractor(char const
> *,class mitk::DataTreeNode *)"
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@1@@Z)
> 1>F:\MITK\build\bin\Debug\MedIAModelBasedSegmentation.dll : fatal
> error LNK1120: 4 unresolved externals
> ...
>
> So as I see, the compiler doesn't find any errors and the problem is
> somewhere by "Smart Pointers" or rather in the "...::New(...)"
> operator, which as I understand should be created by the macros in
> AffineSurfaceInteractor.h:
>
> mitkClassMacro(AffineSurfaceInteractor, Interactor);
> // itkNewMacro(Self);
> mitkNewMacro2Param(Self, const char*, DataTreeNode*);
>
> So the questions are - what am I doing wrong? how can I manage the
> problem?
>
>
> Thank you for your answers,
> Roman.
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> ------------------------------------------------------------------------
>
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users