[Insight-users] Convert to 3D: DeformableRegistration17 & 16
Luis Ibanez
luis.ibanez at kitware.com
Wed May 26 12:41:14 EDT 2010
Hi Ganesh,
I was hoping that you will apply the patch by copying it
into a file and then using
patch -p0 < file.txt
The changes that you describe in your email do not
correspond to the patch that I posted.
DeformableRegistration17.cxx only needed to change
the line
- const unsigned int Dimension = 2;
+ const unsigned int Dimension = 3;
and
DeformableRegistration16.cxx needed:
- 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;
-------------
"patch" is a very useful tool, you will benefit
from investing some time in getting familiar with it.
Regards,
Luis
--------------------------------------------------------------------
On Mon, May 10, 2010 at 10:23 AM, Ganesh Narayanasamy
<nganesh76 at hotmail.com> wrote:
>
> Is there someone who can help me understand the patch below that converts
> DeformableRegistration 16 & 17 from 2D into 3D image processing tool.
>
> Thanks a ton,
> Ganesh
>
>>
>> > Date: Sun, 2 May 2010 18:14:09 -0400
>> > Subject: Re: [Insight-users] Convert to 3D: DeformableRegistration17 &
>> > 16
>> > From: luis.ibanez at kitware.com
>> > To: nganesh76 at hotmail.com
>> > CC: insight-users at itk.org
>> >
>> > 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
>> > >
>
>
> ________________________________
> Hotmail is redefining busy with tools for the New Busy. Get more from your
> inbox. See how.
> _____________________________________
> 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