[Insight-users] Simple 3D Gaussian Blur problem

John.David Q johndq at gmail.com
Fri Jul 7 14:32:14 EDT 2006


I am getting started with the ITK toolkit and am trying to do a simple 3D blur.

I was able to use DiscreteGaussianImageFilter.cxx to write to a BMP,
which wrote one slice and was correctly blurred (in 2D only, I
believe).

I then changed InputImageType and OutputImageType to "3" and
recompiled, to allow a 3D volume to be read/written.

My input file is in MHD format with dimensions 631x720x43, and I am
trying to write to a new MHD output file.

My CMakeLists.txt was as follows:

PROJECT(threeDblur)

FIND_PACKAGE(ITK)
IF(ITK_FOUND)
   INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
   MESSAGE(FATAL_ERROR "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)

ADD_EXECUTABLE(DiscreteGaussianImageFilter DiscreteGaussianImageFilter.cxx)

TARGET_LINK_LIBRARIES(DiscreteGaussianImageFilter ITKCommon
ITKBasicFilters ITKIO)

and I called the program with the following:
DiscreteGaussianImageFilter input.mhd output.mhd 2 5

I got the following error:
Unhandled exception at 0x004258ac in DiscreteGaussianImageFilter.exe:
0xC0000005: Access violation reading location ox3ff00010.

Is this the correct way to do 3D filtering? Might anyone have any
insight into this?

Thank you,
John David Quartararo


More information about the Insight-users mailing list