[Insight-users] Convert to 3D: DeformableRegistration17 & 16

Luis Ibanez luis.ibanez at kitware.com
Sun May 2 18:14:09 EDT 2010


Hi Ganesh,

Here is the patch that you need to apply to

    DeformableRegistration16.cxx
    DeformableRegistration17.cxx

in order to use them in 3D images:

------------------------------------------------------------------
Index: DeformableRegistration16.cxx
===================================================================
RCS file: /cvsroot/Insight/Insight/Examples/Registration/DeformableRegistration16.cxx,v
retrieving revision 1.3
diff -p -u -r1.3 DeformableRegistration16.cxx
--- DeformableRegistration16.cxx	21 Nov 2009 21:23:25 -0000	1.3
+++ DeformableRegistration16.cxx	2 May 2010 22:03:24 -0000
@@ -125,10 +125,10 @@ protected:
   // define ITK short-hand types
   typedef short PixelType;
   typedef float InternalPixelType;
-  typedef itk::Image< PixelType, 2 > ImageType;
-  typedef itk::Image< InternalPixelType, 2 > InternalImageType;
-  typedef itk::Vector< float, 2 > VectorPixelType;
-  typedef itk::Image< VectorPixelType, 2 > DeformationFieldType;
+  typedef itk::Image< PixelType, 3 > ImageType;
+  typedef itk::Image< InternalPixelType, 3 > InternalImageType;
+  typedef itk::Vector< float, 3 > VectorPixelType;
+  typedef itk::Image< VectorPixelType, 3 > DeformationFieldType;
   typedef itk::DemonsRegistrationFilter< InternalImageType,
     InternalImageType, DeformationFieldType> RegistrationFilterType;

@@ -201,7 +201,7 @@ int main( int argc, char * argv [] )
     }

   // define ITK short-hand types
-  const unsigned int Dimension = 2;
+  const unsigned int Dimension = 3;
   typedef short PixelType;
   typedef float InternalPixelType;
   typedef itk::Image< PixelType, Dimension > ImageType;
Index: DeformableRegistration17.cxx
===================================================================
RCS file: /cvsroot/Insight/Insight/Examples/Registration/DeformableRegistration17.cxx,v
retrieving revision 1.3
diff -p -u -r1.3 DeformableRegistration17.cxx
--- DeformableRegistration17.cxx	21 Nov 2009 21:23:25 -0000	1.3
+++ DeformableRegistration17.cxx	2 May 2010 22:03:25 -0000
@@ -203,7 +203,7 @@ int main( int argc, char * argv [] )
     }

   // define ITK short-hand types
-  const unsigned int Dimension = 2;
+  const unsigned int Dimension = 3;
   typedef short PixelType;
   typedef float InternalPixelType;
   typedef itk::Image< PixelType, Dimension > ImageType;

-----------------------------------------------

Regarding the examples:

       *  DeformableRegistration9
       *  DeformableRegistration10

Please look at the CMakeLists.txt file in

   Insight/Examples/Registration/

to line 90-98 you will find:

IF( USE_FFTWD )
  ADD_EXECUTABLE(DeformableRegistration9 DeformableRegistration9.cxx )
  TARGET_LINK_LIBRARIES(DeformableRegistration9
      ITKIO ITKAlgorithms ITKNumerics)

  ADD_EXECUTABLE(DeformableRegistration10 DeformableRegistration10.cxx )
  TARGET_LINK_LIBRARIES(DeformableRegistration10
                        ITKIO ITKAlgorithms ITKNumerics)
ENDIF( USE_FFTWD )



That is, these two examples are only build if you are
using the FFTW Library.

You will have to download and build FFTW, and then
reconfigure ITK with CMake, to turn ON the option

                  USE_FFTWD


     Regards,


          Luis


-------------------------------------
On Thu, Apr 29, 2010 at 11:00 AM, Ganesh Narayanasamy
<nganesh76 at hotmail.com> wrote:
>
>
> I would like to convert DeformableRegistration 17 & 16 from 2D into 3D. Can
> some one send me the changes along with the location. The ones that I can
> spot are:
>
> In DeformableRegistration17.cxx,
> Change Line 206 from "const unsigned int Dimension = 2;"  into 3
>
> In DeformableRegistration16.cxx,
> Change Line 204 from "const unsigned int Dimension = 2;"  into 3
>
> ***
> In a related query, I can find DeformableRegistration9 & 10.cxx inside
> C:\ITK316\ITK\Examples\Registration\, however all of the
> DeformableRegistration9 & 10.VC++ project related files are missing from the
> C:\ITK316\Build\Examples\Registration\. Can you help me create these ?
>
>
> Thanks,
> Ganesh
>
>
>
> ************************************************************************
> "What the mind of man can conceive and believe, It can achieve" - Napolean
> Hill
> -Ganesh Narayanasamy,Ph.D., PostDoc-University of Kentucky Cancer Center
> Earlier work: http://www.sciencedaily.com/releases/2007/05/070504133017.htm
> ************************************************************************
>
>
> ________________________________
> The New Busy is not the too busy. Combine all your e-mail accounts with
> Hotmail. Get busy.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.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-users
>
>


More information about the Insight-users mailing list