Prashanth | 1 Feb 20:55 2009
Picon

http://hdl.handle.net/1926/224 )

All, I downloaded the 3D statistical shape models codes from http://hdl.handle.net/1926/224 (Implementing the Automatic Generation of 3D Statistical Shape Models with ITK by Heimann T., Oguz I., Wolf I., Styner M., Meinzer H.) and 'am trying to build it against ITK-3.1.0 using Visual Studio 2005 Version 8.0 . I have built ITK successfully but I get the following error when I try to build the statistical shape model classes. As far as I can tell, the function declaration looks correct. Any help in this regard will be greatly appreciated.   Compiling... main.cpp f:\itkSphericalParameterizedTriangleMesh.txx(140) : error C2244: 'itk::SphericalParameterizedTriangleMesh::UpdateParameterization' : unable to match function definition to an existing declaration f:\itkSphericalParameterizedTriangleMesh.h(84) : see declaration of 'itk::SphericalParameterizedTriangleMesh::UpdateParameterization' definition 'void itk::SphericalParameterizedTriangleMesh::UpdateParameterization(ParameterizedTriangleMesh::Pointer)' existing declarations 'void itk::SphericalParameterizedTriangleMesh::UpdateParameterization(itk::SmartPointer>)' Thanks Prashanth ,TINDEX,TCOORDREPTYPE>,TINDEX,TCOORDREPTYPE>,TINDEX,TCOORDREPTYPE>,TINDEX,TCOORDREPTYPE>,TINDEX,TCOORDREPTYPE>,TINDEX,TCOORDREPTYPE>
_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
RAGHU PRASAD | 2 Feb 11:30 2009
Picon

Vol View 3.0 Plugins

Respected Sir,
 
 
Is there a facility to add our own plugins in Vol view 3.0.If so should the plugin be added in a similar manner as of Vol view 2.0.There is no description about plugins in volview 3.0 user manual.Pl help.

--
Warm Regards

Raghu Prasad
_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
Xavier Planes | 2 Feb 16:01 2009

itk::OrientImageFilter

Hi,

 

                I’ve tried to use the filter itk::OrientImageFilter. I’ve read a several documentation about DICOM orientation standards, tried some source code examples and read several emails in the mailing list without success…  . My main goal is to be able to transform the DICOM volume image that can be in any DICOM orientation (LPS, RAS, RAI, LPI, …) to an itk Volume image always oriented in the same way (for example LPS).

 

                I’ve tried this code:

 

                typedef itk::OrientedImage<dcmAPI::PixelType, 3> OrientedVolumeType;

                typedef itk::ImageSeriesReader< OrientedVolumeType > VolumeReader;

 

                VolumeReader::Pointer volumeReader = VolumeReader::New();

                itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New();

                volumeReader->SetImageIO( dicomIO );

                volumeReader->SetFileNames( sliceFilePaths );

                volumeReader->Update();

                OrientedVolumeType::Pointer volume = volumeReader->GetOutput();

 

itk::OrientImageFilter<VolumeType,VolumeType>::Pointer orienter = itk::OrientImageFilter<VolumeType,VolumeType>::New();

                orienter->UseImageDirectionOn();

                orienter->SetDesiredCoordinateOrientation( itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LPS);

                orienter->SetInput(volume);

                orienter->Update();

 

                It works fine with RAI input image orientation. However, it doesn’t work for RSA input image orientation because the output image is not in LPS orientation. I’ve used VolView to check that the input images are correct and it works fine: the VTK output image is always in the same orientation.

 

I’ve also debugged a little bit with DICOM RSA input orientation. The itk::OrientImageFilter does this steps:

1.       RSA -> RAS. Permute Y And Z axis

2.       RAS -> LAS. Flip X axis

3.       LAS -> LPS. Flip Y axis

However the output is not correct. It seems that when input image is permuted (Y and Z axis), the orientation of the third axis is also indirectly flipped (X). So after the permute filter, the image orientation is not RAS, as it was expected by the filter.

 

I was thinking to create a table for permutation and flipping parameters depending on each orientation. However I don’t have sample DICOM data for all the possible orientations.

 

Has anybody tried this filter? Has anybody tried RSA orientation input image? Do you know what input image orientations have been tried?

 

Thanks!

Xavi

_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
Bill Lorensen | 2 Feb 16:27 2009
Picon

Re: itk::OrientImageFilter

I think the OrientImageFIlter's letter notation is the opposite of the
DICOM orientations.

Instead of LPS, try RAI.

Bill
On Mon, Feb 2, 2009 at 10:01 AM, Xavier Planes <xplanes@...> wrote:
> Hi,
>
>
>
>                 I've tried to use the filter itk::OrientImageFilter. I've
> read a several documentation about DICOM orientation standards, tried some
> source code examples and read several emails in the mailing list without
> success…  . My main goal is to be able to transform the DICOM volume image
> that can be in any DICOM orientation (LPS, RAS, RAI, LPI, …) to an itk
> Volume image always oriented in the same way (for example LPS).
>
>
>
>                 I've tried this code:
>
>
>
>                 typedef itk::OrientedImage<dcmAPI::PixelType, 3>
> OrientedVolumeType;
>
>                 typedef itk::ImageSeriesReader< OrientedVolumeType >
> VolumeReader;
>
>
>
>                 VolumeReader::Pointer volumeReader = VolumeReader::New();
>
>                 itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New();
>
>                 volumeReader->SetImageIO( dicomIO );
>
>                 volumeReader->SetFileNames( sliceFilePaths );
>
>                 volumeReader->Update();
>
>                 OrientedVolumeType::Pointer volume =
> volumeReader->GetOutput();
>
>
>
> itk::OrientImageFilter<VolumeType,VolumeType>::Pointer orienter =
> itk::OrientImageFilter<VolumeType,VolumeType>::New();
>
>                 orienter->UseImageDirectionOn();
>
>                 orienter->SetDesiredCoordinateOrientation(
> itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LPS);
>
>                 orienter->SetInput(volume);
>
>                 orienter->Update();
>
>
>
>                 It works fine with RAI input image orientation. However, it
> doesn't work for RSA input image orientation because the output image is not
> in LPS orientation. I've used VolView to check that the input images are
> correct and it works fine: the VTK output image is always in the same
> orientation.
>
>
>
> I've also debugged a little bit with DICOM RSA input orientation. The
> itk::OrientImageFilter does this steps:
>
> 1.       RSA -> RAS. Permute Y And Z axis
>
> 2.       RAS -> LAS. Flip X axis
>
> 3.       LAS -> LPS. Flip Y axis
>
> However the output is not correct. It seems that when input image is
> permuted (Y and Z axis), the orientation of the third axis is also
> indirectly flipped (X). So after the permute filter, the image orientation
> is not RAS, as it was expected by the filter.
>
>
>
> I was thinking to create a table for permutation and flipping parameters
> depending on each orientation. However I don't have sample DICOM data for
> all the possible orientations.
>
>
>
> Has anybody tried this filter? Has anybody tried RSA orientation input
> image? Do you know what input image orientations have been tried?
>
>
>
> Thanks!
>
> Xavi
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@...
> http://www.itk.org/mailman/listinfo/insight-users
>
>
Pascal | 2 Feb 16:44 2009
Picon

Re: itk::OrientImageFilter

Hi all,


I am faced with a problem regarding the pasting or stitching of oblique images in a final volume. For instance, suppose I have three images, each one oriented at Rx=[-5, 0, +5] degrees, how could I read these oriented images and place all three in a common volume?

I am not certain that the OrientImageFilter can do these, even though it can allow us to use the following command:

orienter --> SetUseImageDirection( );



any insight on this would be appreciated.



Pascal





--- On Mon, 2/2/09, Bill Lorensen <bill.lorensen <at> gmail.com> wrote:
From: Bill Lorensen <bill.lorensen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [Insight-users] itk::OrientImageFilter
To: "Xavier Planes" <xplanes-P5HpC1UPS0/LixkjEbJ6SQ@public.gmane.org>
Cc: "insight-users-RyaoCGfWeh4@public.gmane.org" <insight-users-RyaoCGfWeh4@public.gmane.org>
Date: Monday, February 2, 2009, 10:27 AM

I think the OrientImageFIlter's letter notation is the opposite of the
DICOM orientations.

Instead of LPS, try RAI.

Bill
On Mon, Feb 2, 2009 at 10:01 AM, Xavier Planes <xplanes-P5HpC1UPS0/LixkjEbJ6SQ@public.gmane.org>
wrote:
> Hi,
>
>
>
> I've tried to use the filter itk::OrientImageFilter.
I've
> read a several documentation about DICOM orientation standards, tried some
> source code examples and read several emails in the mailing list without
> success… . My main goal is to be able to transform the DICOM volume
image
> that can be in any DICOM orientation (LPS, RAS, RAI, LPI, …) to an itk
> Volume image always oriented in the same way (for example LPS).
>
>
>
> I've tried this code:
>
>
>
> typedef itk::OrientedImage<dcmAPI::PixelType, 3>
> OrientedVolumeType;
>
> typedef itk::ImageSeriesReader< OrientedVolumeType >
> VolumeReader;
>
>
>
> VolumeReader::Pointer volumeReader = VolumeReader::New();
>
> itk::GDCMImageIO::Pointer dicomIO =
itk::GDCMImageIO::New();
>
> volumeReader->SetImageIO( dicomIO );
>
> volumeReader->SetFileNames( sliceFilePaths );
>
> volumeReader->Update();
>
> OrientedVolumeType::Pointer volume =
> volumeReader->GetOutput();
>
>
>
> itk::OrientImageFilter<VolumeType,VolumeType>::Pointer orienter =
> itk::OrientImageFilter<VolumeType,VolumeType>::New();
>
> orienter->UseImageDirectionOn();
>
> orienter->SetDesiredCoordinateOrientation(
> itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LPS);
>
> orienter->SetInput(volume);
>
> orienter->Update();
>
>
>
> It works fine with RAI input image orientation. However,
it
> doesn't work for RSA input image orientation because the output image
is not
> in LPS orientation. I've used VolView to check that the input images
are
> correct and it works fine: the VTK output image is always in the same
> orientation.
>
>
>
> I've also debugged a little bit with DICOM RSA input orientation. The
> itk::OrientImageFilter does this steps:
>
> 1. RSA -> RAS. Permute Y And Z axis
>
> 2. RAS -> LAS. Flip X axis
>
> 3. LAS -> LPS. Flip Y axis
>
> However the output is not correct. It seems that when input image is
> permuted (Y and Z axis), the orientation of the third axis is also
> indirectly flipped (X). So after the permute filter, the image orientation
> is not RAS, as it was expected by the filter.
>
>
>
> I was thinking to create a table for permutation and flipping parameters
> depending on each orientation. However I don't have sample DICOM data
for
> all the possible orientations.
>
>
>
> Has anybody tried this filter? Has anybody tried RSA orientation input
> image? Do you know what input image orientations have been tried?
>
>
>
> Thanks!
>
> Xavi
>
> _______________________________________________
> Insight-users mailing list
> Insight-users-RyaoCGfWeh4@public.gmane.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
_______________________________________________
Insight-users mailing list
Insight-users-RyaoCGfWeh4@public.gmane.org
http://www.itk.org/mailman/listinfo/insight-users

_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
Xavier Planes | 2 Feb 18:28 2009

Re: itk::OrientImageFilter

Thanks Bill, I've read that itk orientation names are the opposite of DICOM orientation names. The real
input image orientations I've tried are LPS (itk is RAI) and LIP (itk is RSA) and the real output image
orientation I would like to get is RAI (itk is LPS). However, I think the problem is not in the output
orientation I set to the filter because for the two input DICOM images I've tried, the output image had
different orientation between them. (sorry, in my first email ALL orientation names are in itk
orientation letter notation).

-----Original Message-----
From: Bill Lorensen [mailto:bill.lorensen@...] 
Sent: lunes, 02 de febrero de 2009 16:27
To: Xavier Planes
Cc: insight-users@...
Subject: Re: [Insight-users] itk::OrientImageFilter

I think the OrientImageFIlter's letter notation is the opposite of the
DICOM orientations.

Instead of LPS, try RAI.

Bill
On Mon, Feb 2, 2009 at 10:01 AM, Xavier Planes <xplanes@...> wrote:
> Hi,
>
>
>
>                 I've tried to use the filter itk::OrientImageFilter. I've
> read a several documentation about DICOM orientation standards, tried some
> source code examples and read several emails in the mailing list without
> success...  . My main goal is to be able to transform the DICOM volume image
> that can be in any DICOM orientation (LPS, RAS, RAI, LPI, ...) to an itk
> Volume image always oriented in the same way (for example LPS).
>
>
>
>                 I've tried this code:
>
>
>
>                 typedef itk::OrientedImage<dcmAPI::PixelType, 3>
> OrientedVolumeType;
>
>                 typedef itk::ImageSeriesReader< OrientedVolumeType >
> VolumeReader;
>
>
>
>                 VolumeReader::Pointer volumeReader = VolumeReader::New();
>
>                 itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New();
>
>                 volumeReader->SetImageIO( dicomIO );
>
>                 volumeReader->SetFileNames( sliceFilePaths );
>
>                 volumeReader->Update();
>
>                 OrientedVolumeType::Pointer volume =
> volumeReader->GetOutput();
>
>
>
> itk::OrientImageFilter<VolumeType,VolumeType>::Pointer orienter =
> itk::OrientImageFilter<VolumeType,VolumeType>::New();
>
>                 orienter->UseImageDirectionOn();
>
>                 orienter->SetDesiredCoordinateOrientation(
> itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LPS);
>
>                 orienter->SetInput(volume);
>
>                 orienter->Update();
>
>
>
>                 It works fine with RAI input image orientation. However, it
> doesn't work for RSA input image orientation because the output image is not
> in LPS orientation. I've used VolView to check that the input images are
> correct and it works fine: the VTK output image is always in the same
> orientation.
>
>
>
> I've also debugged a little bit with DICOM RSA input orientation. The
> itk::OrientImageFilter does this steps:
>
> 1.       RSA -> RAS. Permute Y And Z axis
>
> 2.       RAS -> LAS. Flip X axis
>
> 3.       LAS -> LPS. Flip Y axis
>
> However the output is not correct. It seems that when input image is
> permuted (Y and Z axis), the orientation of the third axis is also
> indirectly flipped (X). So after the permute filter, the image orientation
> is not RAS, as it was expected by the filter.
>
>
>
> I was thinking to create a table for permutation and flipping parameters
> depending on each orientation. However I don't have sample DICOM data for
> all the possible orientations.
>
>
>
> Has anybody tried this filter? Has anybody tried RSA orientation input
> image? Do you know what input image orientations have been tried?
>
>
>
> Thanks!
>
> Xavi
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@...
> http://www.itk.org/mailman/listinfo/insight-users
>
>

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.233 / Virus Database: 270.10.10/1903 - Release Date: 2/1/2009 6:02 PM
Luis Ibanez | 2 Feb 20:15 2009

Re: Fwd: ITK and VTK in an app

Hi John,

Yes, copying the files is still the simplest way to proceed.

Note that you may find useful also:

        vtkKWImage.cxx
        vtkKWImage.h
        vtkKWImageIO.cxx
        vtkKWImageIO.h

These are the classes described in the Insight Journal paper:

    http://hdl.handle.net/1926/495

    http://www.insight-journal.org/browse/publication/146

Regards,

     Luis

-----------------------
John Drescher wrote:
> Is the copying of the headers to your application still the
> recommended method of combining ITK and VTK in applications?
> 
> itkImageToVTKImageFilter.h
> itkImageToVTKImageFilter.txx
> itkVTKImageToImageFilter.h
> itkVTKImageToImageFilter.txx
> 
> http://www.itk.org/Wiki/ITK_FAQ#How_to_combine_ITK_and_VTK_in_my_application
> 
> I tried to enable the USE_WRAP_ITK and ITK_USE_REVIEW but this takes a
> really long time to build (on windows) and fails to build on gentoo
> linux. It's seems like I really should take the advice of the wiki.
> 
> --
> John M. Drescher
> _______________________________________________
> Insight-users mailing list
> Insight-users@...
> http://www.itk.org/mailman/listinfo/insight-users
> 
Luis Ibanez | 2 Feb 20:20 2009

Re: interpolation in itk


HI Greg,

You will find examples on the use of the LinearInterpolator at:

      Insight/Examples/Filtering
          ResampleImageFilter4.cxx
          ResampleImageFilter5.cxx
          ResampleImageFilter6.cxx
          ResampleImageFilter9.cxx
          ResampleVolumesToBeIsotropic.cxx
          SubsampleVolume.cxx

They are all described in detail in the ITK Software Guide

     http://www.itk.org/ItkSoftwareGuide.pdf

Please note that the Linear interpolator, when instantiated
on 3D images will perform tri-linear interpolation.

   Regards,

       Luis

-------------------
Greg Fokum wrote:
> Greetings
> 
> I would like to know that the solution to do 3D trilinear interpolation 
> in itk is.
> I have some 3D data ,actually a 3D grid of dimensions NX NY and NZ each 
> x,y,z point in the grid is associated with a scalar float value. I want 
> to get an arbitray xi,yi,zi point and interoplate into my 3D data. Can 
> someone show me a filter pipeline for doing this ?
> 
> Thanks in advance
> 
> GT
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@...
> http://www.itk.org/mailman/listinfo/insight-users
Luis Ibanez | 2 Feb 20:25 2009

Re: if there are somethings wrong with deform image using deform fields?

Hi Han,

Your code looks good, except for the fact that you
are computing the displacement backwards

Instead of:

  displacement = fixedPoint -movingPoint;

You should do:

  displacement = movingPoint -fixedPoint;

This is clearer if you look at the source code
of the WarpImageFilter, to see how the displacement
is going to be used during resampling:

Insight/Code/BasicFilters/itkWarpImageFilter.txx
lines 202-231:

   while( !outputIt.IsAtEnd() )
     {
     // get the output image index
     index = outputIt.GetIndex();
     outputPtr->TransformIndexToPhysicalPoint( index, point );

     // get the required displacement
     displacement = fieldIt.Get();

     // compute the required input image point
     for(unsigned int j = 0; j < ImageDimension; j++ )
       {
       point[j] += displacement[j];
       }

     // get the interpolated value
     if( m_Interpolator->IsInsideBuffer( point ) )
       {
       PixelType value = static_cast<PixelType>(
         m_Interpolator->Evaluate( point ) );
       outputIt.Set( value );
       }
     else
       {
       outputIt.Set( m_EdgePaddingValue );
       }
     ++outputIt;
     ++fieldIt;
     progress.CompletedPixel();
     }

   Regards,

       Luis

----------------
Han D. F wrote:
>  I use the bspline deform field (which is computed from the bapline 
> registration algorithm) to wrap the image to the new image.
> When I use the the bspline parameters, the result is ok.
> when using the defor field, the result is wrong.
> Below is the code, id there is some thing wrong?
> thnanks
>  
> assuming the bsplineTransform is computed and I will compute the deform 
> field and warp to a new image.
> help me check the code and many thanks to your help
>  
> // define the  types for computing deform field
>  typedef itk::Point< float, ImageDimension > PointType;     
> typedef itk::Vector< float, ImageDimension > VectorType;
> typedef itk::Image< VectorType, ImageDimension > DeformationFieldType;
> DeformationFieldType::Pointer field = DeformationFieldType::New();
> field->SetRegions( fixedRegion );
> field->SetOrigin( fixedOrigin );
> field->SetSpacing( fixedSpacing );
> field->SetDirection( fixedDirection );
> field->Allocate();
> typedef itk::ImageRegionIterator< DeformationFieldType > FieldIterator;
> FieldIterator fi( field, fixedRegion );
> fi.GoToBegin();
> TransformType::InputPointType fixedPoint;
> TransformType::OutputPointType movingPoint;
> DeformationFieldType::IndexType index;
> VectorType displacement;
> // getting the deform field, I have see the result the computed 
> displacement  is right
> while( ! fi.IsAtEnd() )
> {
> index = fi.GetIndex();
> field->TransformIndexToPhysicalPoint( index, fixedPoint );
> movingPoint = bsplineTransform->TransformPoint( fixedPoint );
> displacement = fixedPoint -movingPoint ;
> fi.Set( displacement );
> //std::cout<<displacement<<std::endl;
> ++fi;
> 
> }
> 
> typedef itk::WarpImageFilter< FixedImageType,
> FixedImageType,
> DeformationFieldType > DeformFilterType;
> DeformFilterType::Pointer filter = DeformFilterType::New();
> //  fiil the deform filter,such as SetInterpolator,SetOutputSpacing,....
> 
> typedef itk::LinearInterpolateImageFunction<
> FixedImageType, double > InterpolatorType1;
> InterpolatorType1::Pointer interpolator1 = InterpolatorType1::New();
> filter->SetInterpolator( interpolator1 );
> filter->SetOutputSpacing( field->GetSpacing() );
> filter->SetOutputOrigin( field->GetOrigin() );
> filter->SetDeformationField( field );
> filter->SetInput( fixedReader->GetOutput() );
> 
> //define the writer
> 
> typedef itk::ImageFileWriter< FixedImageType > WriterType;
> WriterType::Pointer writer = WriterType::New();
> writer->SetFileName( argv[5] );
> writer->SetInput( filter->GetOutput() );
>  // try the wrap filter and get the result
> try
> {
> writer->Update();
> }
> catch( itk::ExceptionObject & excp )
> {
> std::cerr << "Exception thrown " << std::endl;
> std::cerr << excp << std::endl;
> }
> 
>  
> 
> 
> 
> ------------------------------------------------------------------------
> Ͱȥ¼¹˽ڣ 
> <http://love.mail.163.com/valentine/main.do>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@...
> http://www.itk.org/mailman/listinfo/insight-users
_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
Luis Ibanez | 2 Feb 20:29 2009

Re: Image Viewer and viewing 3D dicom images


Hi Shoosh,

The source code of the ImageViewer is available in
the InsightApplications module, under the directory

     InsightApplications/ImageViewer

Instructions on how to download ImageApplications
are available at:

http://www.itk.org/ITK/resources/software.html

(for CVS instructions, please look at the bottom
  of that page).

For other image viewers,
You may want to try:

   a) Slicer  www.slicer.org

   b) VV
      http://www.midasjournal.org/browse/publication/288

   c) and of course SNAP

   Regards,

       Luis

---------------------
shoosh moosh wrote:
> Hi,
> I need an application to help me view images in ITK. I think Image 
> Viewer can be used, but I can't find the source for it. Where can I 
> download it from?
> Also, can Image Viewer be used to view dicom volumes? If not, what 
> should I use? SNAP?
> Thanks,
> 
> ------------------------------------------------------------------------
> Get news, entertainment and everything you care about at Live.com. Check 
> it out! <http://www.live.com/getstarted.aspx >
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@...
> http://www.itk.org/mailman/listinfo/insight-users

Gmane