help > ITK plugins
Showing 1-9 of 9 posts
Display:
Results per page:
Jun 17, 2010  11:06 AM | Aurelien Lucchi
ITK plugins
Hi,
I managed to compile the ITK plugins on my laptop (64 bits machine) after adding a flag when compiling the v3dinterface library. In the CMakeLists.txt, the following line should be added at the end :
SET_TARGET_PROPERTIES(V3DInterface PROPERTIES COMPILE_FLAGS -fPIC)

Unfortunately, I get an error when I select one of those plugins in the v3d menu. See details below. Can somebody tell me what I'm doing wrong ?
$ gdb ./v3d
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/v3d...done.
(gdb) r
Starting program: /home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/v3d
[Thread debugging using libthread_db enabled]
Searching in ./plugins ......
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/5D_Stack_Converter/libmovieZCswitch.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/Canvas_Eraser/libcanvas_eraser.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/Change_Pixel_Value/libupdatepxlval.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/Distance_Transform/libdt.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/Gaussian_Filter/libgaussianfilter.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libConnectedComponents.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libDemonsRegistration.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKCannyEdgeDetection.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKCannySegmentation.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKConfidenceConnected.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKConnectedThreshold.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKFastMarching.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKGeodesicActiveContour.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKGradientMagnitudeRecursiveGaussian.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKIsolatedConnected.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKShapeDetection.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKThresholdSegmentation.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libKmeans.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libRegistrationAffine.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libRegistrationBSpline_2D.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libRegistrationBSpline_3D.so"
fail of instance: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libV3DInterface.a"
fail of instance: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libV3DITKCommon.a"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/min_Max_Filter/libminMaxfilter.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/ReCenter_Image/librecenterimage.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/Rotate_Image/librotateimg90.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/V3D_Plugin_Multi_Image_Interface_demo/libnewwindow.so"
plugin: "/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/V3D_Plugin_Single_Image_Interface_demo/libextrafilters.so"
Searching ./plugins done.
cur layout=15009584
MainWindow::createMdiChild *** workspace->windowList: () += XFormWidget(0xe433e0)
size hint=890 849 min size hint=890 792
/home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/FIBSLICE0080_rgb.tif
The current input file has the surfix [tif]
img data size 2048 1536 1 3
MainWindow allWindowList: (0xe433e0)
MainWindow allWindowList: (0xe433e0)

Program received signal SIGSEGV, Segmentation fault.
0x0000000000007265 in ?? ()
(gdb) where
#0 0x0000000000007265 in ?? ()
#1 0x00007fffeea9d997 in ITKThresholdSegmentationSpecializaed::Execute(V3DPluginCallback&, QWidget*) ()
from /home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKThresholdSegmentation.so
#2 0x00007fffeea97f87 in ITKThresholdSegmentationPlugin::domenu(QString const&, V3DPluginCallback&, QWidget*) ()
from /home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/plugins/itk/libITKThresholdSegmentation.so
#3 0x000000000043156e in V3d_PluginLoader::runPluginInterface(QObject*, QString const&) ()
#4 0x0000000000431a65 in V3d_PluginLoader::runPlugin() ()
#5 0x00000000005de716 in V3d_PluginLoader::qt_metacall(QMetaObject::Call, int, void**) ()
#6 0x00007ffff690134f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/libQtCore.so.4
#7 0x00007ffff6df3222 in QAction::triggered(bool) ()
from /home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/libQtGui.so.4
#8 0x00007ffff6df529b in QAction::activate(QAction::ActionEvent) ()
from /home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/libQtGui.so.4
#9 0x00007ffff72112bd in ?? ()
from /home/alboot/bin/v3d_2.466_ubuntu9.1_64bit/libQtGui.so.4
#10 0x00007ffff7216e2a in ?? ()
Jun 17, 2010  06:06 PM | Hanchuan Peng
RE: ITK plugins
probably because you will need to download the latest V3D interface (v0.95) source code, where the v3d_interface.h was changed.

See the tool page at http://penglab.janelia.org/proj/v3d/V3D/... for the source code of the new v3d interface.

Also you need to download the latest V3D (v2.475) that accepts the plugin interface (v0.95).

Luis has a ubuntu 64bit machine and the ITK V3D plugins work very well on his machine.
Jun 18, 2010  02:06 PM | Aurelien Lucchi
RE: ITK plugins
Downloading the latest v3d did the trick :-) (the v3d_interface.h was already the correct one). Some plugins give me black images but that's probably because of the use of wrong parameters. I'll change them in the code.
By the way, does anybody know if there is any implementation of a 3d canny in ITK ?

Aurelien
Jun 18, 2010  02:06 PM | Hanchuan Peng
RE: ITK plugins
the best way for you to change the code, which is very much welcome, is to add you in the ITK-v3d developing team, Do you like that idea?

Luis can definitely answer the 3d canny question.
Jun 22, 2010  02:06 AM | Luis Ibanez
RE: ITK plugins

Hi Aurelien,


Yes, as Hanchuan pointed out,

the Canny Edge Detection filter is available in ITK:
http://www.itk.org/Doxygen/html/classitk...

and already a V3D plugin has been created for it.

You will find it under:

http://github.com/luisibanez/ITK-V3D-Plu...


It will appear in the "EdgeDetection" menu
of the plugins. (This will work in 3D).


Please give it a try
and let us know if you find
any problems with it.


Thanks


Luis



------------------------------------
Originally posted by Hanchuan Peng:
the best way for you to change the code, which is very much welcome, is to add you in the ITK-v3d developing team, Do you like that idea?

Luis can definitely answer the 3d canny question.[/userquote]
Jun 22, 2010  08:06 AM | Aurelien Lucchi
RE: ITK plugins
Hello,
I keep getting a black image, even after changing the thresholds. Could you send me the image you used to test the canny plugin ? I'm wondering if it's an issue with v3d or the ITK plugin. I'll probably save the image and open it in matlab...

unsigned char lowerTh = 10;
unsigned char upperTh = 255;
//cannyedgedetectionFilter->SetThreshold(th);
cannyedgedetectionFilter->SetLowerThreshold(lowerTh);
cannyedgedetectionFilter->SetUpperThreshold(upperTh);

By the way, I don't know too much about ITK but I was surprised to see that the thresholds are of type uchar. Shouldn't it be float values ?
Jun 22, 2010  10:06 AM | Hanchuan Peng
RE: ITK plugins
we designed some global options in the newly added "plugin" tab in the "adjust preference" menu. from there you can control which channel the operation is applied for, if the output needs to be rescaled, and if displayed in a new window, etc.

While I am not the one who wrote the Canny plugin, it seems Canny will produce a binary result and thus should be rescaled?

ITK threshold can be any data type. The plugin is still an alpha version and it can be improved!

Alpha version also means that some of the developers may not follow the new plugin features and thus there may be bugs. You are welcome to adjust the src code to make them work best!

Jun 23, 2010  08:06 AM | Aurelien Lucchi
RE: ITK plugins
Hi,
Thanks for your help. I changed the thresholds and it now works perfectly. I changed the dialog window so we can specify the lower and upper thresholds. I committed the changes to the git repository. I'm new with GIT (I usually use SVN) so let me know if I did something wrong. By the way, is there any code convention people should use ?

Last question about the ITK plugin : is that a real 3d canny edge detector or does it just perform a 2d canny on each slice individually ?
Jun 23, 2010  10:06 AM | Hanchuan Peng
RE: ITK plugins
no sure what part of the code convention you are talking about. But we created some plugin preference for which channel to use, if or not do rescaling for output, etc. You can see in the preference dialog. The interface to ITK is quite new and is still evolving.

The canny should be 3d. if you want to do 2d, you can write a for loop there to call the 2d filter for all z slices.