[Insight-users] SignedDanielssonDistanceMapImageFilter runtime error
Luis Ibanez
luis.ibanez at kitware.com
Tue May 6 15:03:49 EDT 2008
Hi Leonid,
Thanks for the detailed description of your problem.
The most likely source of the problem is that you may be using
PNG as the output file format for the distance image.
PNG does not support pixel type "float".
Please use formats such as
* MetaImage
* VTK
as output file formats.
For example:
SignedDanielssonDistanceMapImageFilter
Circle.png CircleDistanceMap.mha voronoiMap.mha vectorDistance.mha
(in a single command line)
or
SignedDanielssonDistanceMapImageFilter
FivePoints.png FivePointsDistance.mha FivePointsVoronoi.mha
FivePointsVector.mha
I just run these two examples with the Nightly build of
ITK and obtained the expected results.
You can view the MetaImage output by using
a) Slicer
b) ParaView
c) SNAP
d) ImageViewer (from InsightApplications)
Please let us know if you have any questions.
Thanks
Luis
----------------------
xiaolong li wrote:
> hi,
>
> i need some help with this.
>
> i try to test
> the Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx.
> accord to the section 6.8 in the itk guide 2.4,
> and i put the source code in a folder and create a CMakeLists.txt
> liket this:
>
> #####################################
> PROJECT(SignedDanielssonDistanceMapImageFilter)
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
> INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
> MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
> ADD_EXECUTABLE(SignedDanielssonDistanceMapImageFilter
> SignedDanielssonDistanceMapImageFilter.cxx )
> TARGET_LINK_LIBRARIES(SignedDanielssonDistanceMapImageFilter
> ITKBasicFilters ITKIO)
> #####################################
>
> then i compile it ( CMake 2.4 + itk 3.6 + Visutal Studio 2005) , fine
>
> when i try to run it with the sample image (Example/Data/Circle.png and
> FivePoints.png), i got a RUNTIME ERROR
>
> i tried to figure out the reason and i found that if i change this line
> ....
> typedef float OutputPixelType;
> ...
>
> to typedef unsigned short OutputPixelType;
>
> program can run but can't get the result as tutroial showed, so i guess
> i messed up with something? btw
>
> i also tried this in other computer (itk 3.4 + visual studio 2003) , no
> luck :(
>
> anyone can help ? thx a lot
>
> leonid
>
>
>
> ------------------------------------------------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
> it now.
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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