[Insight-developers] Develop ITK

Daniel Blezek Blezek.Daniel at mayo.edu
Mon Jul 6 10:50:12 EDT 2009


Hi Nikos,

  As I remember, Lidia Ng put specific code in the registration framework to
increase the efficiency of registration using BSplines.  Before spending a
lot of time profiling, you may want to look through the classes.  This
mainly related to coping in/out the transformation parameters.  You may be
able to do the same if you subclass the BSpline Transformation.

-dan


On 7/5/09 4:54 PM, "Luis Ibanez" <luis.ibanez at kitware.com> wrote:

> 
> 
> Hi Nikos,
> 
> 
> It looks like the new Transform that you wrote has some
> inefficient code in it.
> 
> 
> A) Could you post the source code of you  Transform ?
>     (to the mailing list)
> 
> B) Have you run a profiler on your code ?
> 
>     LTProf is a good option,
> 
>     kcachegrind is another option for locating bottlenecks
>     http://kcachegrind.sourceforge.net/html/Home.html
> 
> 
>    Regards,
> 
> 
>       Luis
> 
> 
> 
> --------------------------
> Nikolaos Dikaios wrote:
>> Hi Luis,
>> 
>> The output of  >>grep CMAKE_BUILD_TYPE CMakeCache.txt is
>> 
>> CMAKE_BUILD_TYPE:STRING=Release
>> //Modified flag for variable: CMAKE_BUILD_TYPE
>> CMAKE_BUILD_TYPE-MODIFIED:INTERNAL=1
>> 
>> The code that i use is almost identical to itk3.8 ... i simply renamed
>> itkBSplineDeformableTransform to itkBSplineNewTransform and
>> itkBSplineInterpolationWeightFunction to
>> itkNewBSplineInterpolationWeightFunction
>> 
>> I kept the rest of the code the same ... I get the same registration
>> output (as expected) but its significantly slower when i include the new
>> files.
>> 
>> Regards,
>> 
>> Nikos
>> 
>> 
>> 
>> On Tue, 2009-06-30 at 13:08 -0400, Luis Ibanez wrote:
>> 
>>> Hi Nikolaos,
>>> 
>>> 
>>> Please verify the build mode by doing:
>>> 
>>>          ccmake .
>>> 
>>> and checking the content of the CMake variable
>>> 
>>> 
>>>      CMAKE_BUILD_TYPE
>>> 
>>> 
>>> It should say "Release"
>>> 
>>> Alternatively, you can also do
>>> 
>>> 
>>>      grep CMAKE_BUILD_TYPE CMakeCache.txt
>>> 
>>> 
>>> in the binary directory of your project.
>>> 
>>> 
>>> If this turned out to be set to Release,
>>> then the next option is to start profiling
>>> your code...   :-/
>>> 
>>> 
>>> 
>>>      Regards,
>>> 
>>> 
>>>          Luis
>>> 
>>> 
>>> 
>>> ----------------------
>>> Nikolaos Dikaios wrote:
>>> 
>>>> Hi Dan,
>>>> 
>>>> Thanks for your reply.
>>>> 
>>>> I used 
>>>> 
>>>> 
>>>> 
>>>>>> cmake -i
>>>> 
>>>> 
>>>> and then
>>>> 
>>>> 
>>>> 
>>>>>> make -release
>>>> 
>>>> 
>>>> in order to build in release mode. But it still is significantly slow.
>>>> 
>>>> Regards,
>>>> 
>>>> Nikos
>>>> 
>>>> 
>>>> On Mon, 2009-06-29 at 18:08 +0200, Dan Mueller wrote:
>>>> 
>>>> 
>>>>> Hi Nikos,
>>>>> 
>>>>> Did you build your source in Release mode? Building in release mode
>>>>> can have massive speed impact...
>>>>> 
>>>>> Please let us know.
>>>>> 
>>>>> Regards, Dan
>>>>> 
>>>>> 2009/6/29 Nikolaos Dikaios <nd301 at wbic.cam.ac.uk>:
>>>>> 
>>>>> 
>>>>>> Dear all,
>>>>>> 
>>>>>> I tried to develop a transformation function in the ITK similar to the
>>>>>> itkBSplineDeformableTransform.h.
>>>>>> 
>>>>>> When i use the the new transformation function, registration becomes
>>>>>> extremely slow (compared to the same registration scheme using the
>>>>>> BSplineDeformableTransform). Has anybody experienced this problem ?
>>>>>> 
>>>>>> Thank you in advance for your help,
>>>>>> 
>>>>>> Nikos
>>>>>> 
>>>>>> PS. The MakeList that i use to cmake is:
>>>>>> 
>>>>>> # Project name
>>>>>> PROJECT(itk_aff_p_nr_reg)
>>>>>> 
>>>>>> # Find the ITK stuff
>>>>>> FIND_PACKAGE(ITK)
>>>>>> IF(ITK_FOUND)
>>>>>>      INCLUDE(${ITK_USE_FILE})
>>>>>> ENDIF(ITK_FOUND)
>>>>>> 
>>>>>> # Set a path to the sources
>>>>>> SET(SOURCES
>>>>>> ../Sources
>>>>>> )
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> # Create a library using different *.cxx
>>>>>> SET(myNRR
>>>>>> ${SOURCES}/itkNewBSplineInterpolationWeightFunction.cxx
>>>>>> ${SOURCES}/itkBSplineTransform.cxx
>>>>>> )
>>>>>> ADD_LIBRARY( aff_p_nr_reg ${myNRR} )
>>>>>> 
>>>>>> # Location of library include files
>>>>>> INCLUDE_DIRECTORIES( ${SOURCES} )
>>>>>> 
>>>>>> # Library location for the linker
>>>>>> LINK_DIRECTORIES( ${SOURCES} )
>>>>>> 
>>>>>> # Add the executable built from *.cxx
>>>>>> ADD_EXECUTABLE( itk_aff_p_nr_reg itk_aff_p_nr_reg.cxx )
>>>>>> 
>>>>>> # Link the executable with required libraries
>>>>>> TARGET_LINK_LIBRARIES( itk_aff_p_nr_reg aff_p_nr_reg ITKCommon
>>>>>> ITKAlgorithms ITKBasicFilters ITKIO ITKStatistics ITKNumerics )
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Powered by www.kitware.com
>>>>>> 
>>>>>> Visit other Kitware open-source projects at
>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>> 
>>>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>>> 
>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>> 
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>> 
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>> 
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>> 
>> 
>> 
>> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers

-- 
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center

P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel at mayo.edu

Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org




More information about the Insight-developers mailing list