[Insight-users] ITK with QT4

Luis Ibanez luis.ibanez at kitware.com
Fri Mar 28 11:48:33 EDT 2008


Hi Prabhat,

1) The CMake messages indicate that you are using
    inconsitent compiler flags when building ITK and CMake.

    A common mistake is to build one library for Release,
    and the other for Debug.

    Please use *only one* compilation mode for all the
    libraries.

2) It seems that a Qt library is missing from the link
    command. (I'll have to double check on this one...)


About your Questions:

a) About how to read DICOM images:
    See the example:

    Insight/Examples/IO/DicomSeriesReadImageWrite2.cxx

    Look also at: InsightApplications/LiverTumorSegmentation


b) For Showing images in Qt, the simplest way is to use
    ITK + VTK + Qt, as it is done in IGSTK (www.igstk.org).


c) For how to use Marching Cubes (iso-surface extraction)
    look at the example:

    InsightApplications/Auxiliary/vtk/
        itkReadITKImage3DSegmentShowVTK.cxx


d) For, visualizing the results...
    look also at the example above in (c).




    Regards,


        Luis


-----------------
prabhat246 wrote:
> Please reply me, I am stuck....
> 
> Oh yes. I was using example from Insight Applications 3.4 
> 
> Well I downloaded the New Version of this example and got following errors 
> 
> When doing cmake 
> -------------------- 
> CMake says while first time configuring. 
> 
> FOUND Qt-Version 4.3.2 
> 
> Then 
> Error D:/Libs/Qt4.3/include 
> Press cancel to suppress any further messages.
> 
> configuring again : 
> 
> Warning : CMake is forcing CMAKE_CXX_FLAGS_RELEASE to "/MD /O2 /Ob2 /D
> /NDEBUG" to Match that imported from ITK. 
> If this message appears for more tahn one imported project, You have
> conflicting Options and will have to rebuild one of those projects.
> 
> and this appear again as 
> 
> Warning : CMake is forcing CMAKE_CXX_FLAGS_MINSIZEREL to "/MD /O1 /Ob2 /D
> /NDEBUG" to Match that imported from ITK. 
> If this message appears for more tahn one imported project, You have
> conflicting Options and will have to rebuild one of those projects. 
> 
> AND ONE MORE TIME 
> 
> Warning : CMake is forcing CMAKE_CXX_FLAGS_RELWITHDEBINFO to "/MD /O1 /Ob2
> /D /NDEBUG" to Match that imported from ITK. 
> If this message appears for more tahn one imported project, You have
> conflicting Options and will have to rebuild one of those projects.
> 
> 
> Well anyhow it generates the project. Building QtSlicer gives following : 
> 
> 
> 1>QtGlSliceView.obj : error LNK2001: unresolved external symbol "public:
> virtual struct QMetaObject const * __thiscall
> QtGlSliceView::metaObject(void)const "
> (?metaObject at QtGlSliceView@@UBEPBUQMetaObject@@XZ) 
> 1>QtGlSliceView.obj : error LNK2001: unresolved external symbol "public:
> virtual void * __thiscall QtGlSliceView::qt_metacast(char const *)"
> (?qt_metacast at QtGlSliceView@@UAEPAXPBD at Z) 
> 1>QtGlSliceView.obj : error LNK2001: unresolved external symbol "public:
> virtual int __thiscall QtGlSliceView::qt_metacall(enum
> QMetaObject::Call,int,void * *)"
> (?qt_metacall at QtGlSliceView@@UAEHW4Call at QMetaObject@@HPAPAX at Z)
> 
> 
> These linking error seems to be resolved by moccing. I generated
> moc_QtGlSliceview.cpp by moccing QtGlSliceview.h and added into project but
> then I get following errors 
> 
> ..\QtImgViewer\moc_QtglSliceView.cpp(73) : error C3861: 'Position':
> identifier not found 
> 1>..\QtImgViewer\moc_QtglSliceView.cpp(86) : error C2039: 'Position' : is
> not a member of 'QtGlSliceView' 
> 1>        c:\users\prabhat\desktop\qtimgviewer\QtGlSliceView.h(85) : see
> declaration of 'QtGlSliceView' 
> 1>..\QtImgViewer\moc_QtglSliceView.cpp(87) : error C2365: 'Position' :
> redefinition; previous definition was 'formerly unknown identifier' 
> 1>..\QtImgViewer\moc_QtglSliceView.cpp(89) : error C2673: 'Position' :
> global functions do not have 'this' pointers 
> 1>..\QtImgViewer\moc_QtglSliceView.cpp(89) : error C2065: 'staticMetaObject'
> : undeclared identifier 
> 1>QtSlicer.cxx
> 
> 
> Hope this helps to identify what wrong is happening. 
> 
> also Please suggest me from your experiences best way to do the following. 
> 
> 1. I want to read a series a dicom images and display it in a Qt widget. 
> 2. Do Marching cubes on Volume of dicom data (isosurface extraction) ans
> save the mesh into some standard formates.
> 3. Visualize the results. 
> 
> For GUI I want to Use Qt 4.3.2, 
> For Image Processing/Visualization ITK/VTK. 
> 
> Please suggest me related examples and simple and straightforward approaches
> to do things. 
> 
> 
> 
> Thanks a lot. 
> 
> Prabhat 
> 
> Luis Ibanez wrote:
> 
>>
>>Hi Prabhat246,
>>
>>What version of ITK are you using ?
>>
>>QtImageViewer in InsightApplications was updated
>>for QT4 ion February 3rd 2008.
>>
>>See here the CVS logs:
>>http://www.itk.org/cgi-bin/viewcvs.cgi/Auxiliary/QtImageViewer/?root=InsightApplications&sortby=date#dirlist
>>
>>
>>Please post to the list any error messages that you
>>get when trying to build QtImageViewer.
>>
>>
>>     Thanks
>>
>>
>>         Luis
>>
>>
>>
>>--------------------
>>prabhat246 wrote:
>>
>>>Hi Insight-Users
>>>I am trying to integrate ITK with Qt4. I want to display an Dicom Image
>>>on
>>>ITK Label.
>>>
>>>I've gone through QtImageViewer example. But I guess it is not for QT 4.
>>>
>>>1. Can any One tell me how can I do it.
>>>2. Please provide me QtImageViewer for QT 4 or above. if anyone
>>>has.[either
>>>mail me or attach in reply]
>>>
>>>
>>>Thanks a lot
>>>
>>>Regards
>>>Prabhat Kumar Gupta
>>>prabhat246 at yahoo.com
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
>>
> 
> 


More information about the Insight-users mailing list