[Insight-users] Re: Simple 3D Gaussian Blur problem

John.David Q johndq at gmail.com
Fri Jul 7 20:38:59 EDT 2006


I have answered my own question.

By using the cmake GUI instead of typing "cmake .", the compiled
program performs correctly and without error.

For reference, I am using:
Windows XP
CMake 2.4 - patch 2
ITK 2.6.0
Visual Studio 7 2003

On 7/7/06, John.David Q <johndq at gmail.com> wrote:
> 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