[Insight-users] ImageRegistration1.cxx
Luis Ibanez
luis.ibanez at kitware.com
Thu Nov 18 11:35:12 EST 2004
Hi Jim
As we mention in the previous email, the results that you
get with the ImageRegistration1.cxx example will not be
*exactly* the same that you see in the book.
A difference of one pixel is reasonable...
All the examples of the book were generated with ITK 1.4
under a Linux machine with Gcc 3.3.
You will find that there are numeric differences in the
results, depending on the platform, the compiler and the
compilation options.
For example, if you are using Visual Studio C++, you can
expect significant numerical differences between a Debug
build and a Release build.
VC++ also tend to use a non-IEEE standard type for
representing float/doubles. That will result in
numerical differences too.
At this point, what you should try is:
1) Make sure that you are compiling for Release
2) Don't be too concerned for matching the values
in the book. Instead, look at the difference
image between the Fixed image and the Resample
moving image and focus in removing any patterns
in that image. That will be done by fine tunning
the parameters of the optimizer.
Please let us know if you have further questions,
Thanks
Luis
------------
Jim wrote:
> Hi Luis,
>
> The "abnormal program termination" disappears when I supply 4 Argcs
> (output image and diff image) but the result is still one off in Y
> direction. Is this ok? I mean, is there any possible problem with the
> itk build I have to cause the difference?
>
> Thanks
>
> Jim
> On Wed, 17 Nov 2004 11:19:36 -0600, Jim <itkvtk at gmail.com> wrote:
>
>>Hi Luis,
>>
>>The 2nd one does the trick. Thanks a lot.
>>
>>I proceed to the ImageRegistration1 example with the two images list
>>on page 220 of the software guidebook. The result is close but not the
>>same and there is an "abnormal program termination" message at the
>>end. What's the cause?
>>
>>C:\Insight\Bin\bin\RelWithDebInfo>ImageRegistration1 c:\insight\examples\data\Br
>>ainProtonDensitySliceBorder20.png c:\insight\examples\data\BrainProtonDensitySli
>>ceR10X13Y17.png
>>Result =
>>Translation X = 13.1268
>>Translation Y = 15.9385
>>Iterations = 20
>>Metric value = 1473.94
>>
>>abnormal program termination
>>
>>
>>Jim
>>
>>
>>
>>On Tue, 16 Nov 2004 19:01:28 -0500, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>>
>>>Hi Jim,
>>>
>>>Thanks for posting your VTK CMakeCache.txt file.
>>>
>>>It looks fine.
>>>
>>>At this point there are two thing that you want
>>>to verify:
>>>
>>>1) Go to the binary directory where you build VTK
>>> and check if the vtkPatented.dll is in there.
>>> Since you build it for RelWithDebInfo you will
>>> find it in a subdirectory bin/RelWithDebInfo.
>>>
>>>2) Then check the PATH environment variable in
>>> your system and make sure that in includes the
>>> directory where you just found the vtkPatented.dll
>>> file. DLLs must be in a directory in the PATH or
>>> they must be in the same directory as your executable.
>>>
>>>If you are using WindowsXP you can set this path
>>>by going to "My Computer" -> Properties -> Advanced.
>>>
>>>Please let us know what you find.
>>>
>>> Thanks
>>>
>>> Luis
>>>
>>>----------------
>>>
>>>
>>>Jim wrote:
>>>
>>>
>>>>Hi Luis,
>>>>
>>>>The vtk was build with VTK_USE_HYBRID, VTK_USE_PARALLEL,
>>>>VTK_USE_PATENTED, and VTK_USE_RENDERING ON and compiled with vs6+sp6
>>>>for Win32 RelWithDebInfo for both VTK, Insight and
>>>>Insight/Applications
>>>>
>>>>CMakeCache.txt attached.
>>>>
>>>>Jim
>>>>
>>>>On Mon, 15 Nov 2004 18:43:16 -0500, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>>>>
>>>>
>>>>>Hi Jim,
>>>>>
>>>>>Did you enabled the CMake variable
>>>>>
>>>>> VTK_USE_PATENTED
>>>>>
>>>>>when you configured VTK ?
>>>>>
>>>>>Note that InsightApplications does not build VTK by itself.
>>>>>
>>>>>You must make sure the you build VTK with PATENTED enabled.
>>>>>
>>>>>If you continue experiencing any problem, please post to
>>>>>the list the CMakeCache.txt file that CMake generates in
>>>>>the binary directory where you built VTK.
>>>>>
>>>>>If you are on Windows, it is a common mistake to build
>>>>>VTK for Release with some options, then change the options
>>>>>and recompile it only for Debug. (or the other way around).
>>>>>Please make sure that you are building *ALL* the libraries
>>>>>for the same compilation mode.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Luis
>>>>>
>>>>>-------------
>>>>>
>>>>>
>>>>>Jim wrote:
>>>>>
>>>>>
>>>>>
>>>>>>Insight/Application compiled with USE_VTK_PATENDED ON but when I try
>>>>>>to run DeformableModelSimplexMesh.exe. An error message says "The
>>>>>>dynamic link libary vtkPatented.dll could not be found in the specific
>>>>>>path c:\insight\applications\bin....
>>>>>>
>>>>>>Please help, Thanks
>>>>>>
>>>>>>Jim
>>>>>>_______________________________________________
>>>>>>Insight-users mailing list
>>>>>>Insight-users at itk.org
>>>>>>http://www.itk.org/mailman/listinfo/insight-users
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>------------------------------------------------------------------------
>>>>>
>>>>># This is the CMakeCache file.
>>>>># For build in directory: c:/VTK/Bin
>>>>># You can edit this file to change values found and used by cmake.
>>>>># If you do not want to change any of the values, simply exit the editor.
>>>>># If you do want to change a value, simply edit, save, and exit the editor.
>>>>># The syntax for the file is as follows:
>>>>># KEY:TYPE=VALUE
>>>>># KEY is the name of a variable in the cache.
>>>>># TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
>>>>># VALUE is the current value for the KEY.
>>>>>
>>>>>########################
>>>>># EXTERNAL cache entries
>>>>>########################
>>>>>
>>>>>//Build the documentation (Doxygen).
>>>>>BUILD_DOCUMENTATION:BOOL=OFF
>>>>>
>>>>>//Build VTK examples.
>>>>>BUILD_EXAMPLES:BOOL=OFF
>>>>>
>>>>>//Build VTK with shared libraries.
>>>>>BUILD_SHARED_LIBS:BOOL=ON
>>>>>
>>>>>//Build the testing tree.
>>>>>BUILD_TESTING:BOOL=ON
>>>>>
>>>>>//Path to a program.
>>>>>CMAKE_AR:FILEPATH=CMAKE_AR-NOTFOUND
>>>>>
>>>>>//For backwards compatibility, what version of CMake commands and
>>>>>// syntax should this version of CMake allow.
>>>>>CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.0
>>>>>
>>>>>//C++ compiler
>>>>>CMAKE_CXX_COMPILER:STRING=cl
>>>>>
>>>>>//Flags used by the compiler during all build types.
>>>>>CMAKE_CXX_FLAGS:STRING= /W3 /Zm1000 /GX /GR
>>>>>
>>>>>//Flags used by the compiler during debug builds.
>>>>>CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Od /GZ
>>>>>
>>>>>//Flags used by the compiler during release minsize builds.
>>>>>CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 /D NDEBUG
>>>>>
>>>>>//Flags used by the compiler during release builds (/MD /Ob1 /Oi
>>>>>// /Ot /Oy /Gs will produce slightly less optimized but smaller
>>>>>// files).
>>>>>CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /D NDEBUG
>>>>>
>>>>>//Flags used by the compiler during Release with Debug Info builds.
>>>>>//
>>>>>CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /D NDEBUG
>>>>>
>>>>>//C compiler
>>>>>CMAKE_C_COMPILER:STRING=cl
>>>>>
>>>>>//Flags for C compiler.
>>>>>CMAKE_C_FLAGS:STRING= /W3 /Zm1000
>>>>>
>>>>>//Flags used by the compiler during debug builds.
>>>>>CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Od /GZ
>>>>
>>>,.....
>>>
>>>
>>
>
>
More information about the Insight-users
mailing list