[IGSTK-Developers] Re: [Insight-users] Brain centering routine ? | MidSagittalPlaneExtractionImageFilter
Luis Ibanez
luis.ibanez at kitware.com
Wed Aug 24 16:52:08 EDT 2005
Hi Xueling,
The MidSaggitalPlaneExtractionImageFilter have lacked
a test since it was contributed to the toolkit two years
ago and as a consequence it has remained in an archaic
state while the toolkit was evolving.
At this point the class will need to be fully rewritten...
A bug report has been logged now for this issue:
Bug # 2185
http://public.kitware.com/Bug/bug.php?op=show&bugid=2185&pos=0
We apologize for having hosted this broken code for so long.
Regards,
Luis
-----------------
Xueling Lu wrote:
> Hi, Luis:
>
> I was trying to use MidSagittalPlaneExtractionImageFilter, but somehow
> the filter itself can not be compiled. As you can see from the code
> below, I have reduced the code to simply instantiating the filter.
>
> #include "itkMidsagittalPlaneExtractionImageFilter.h"
> #include "itkImage.h"
> #include "itkImageFileReader.h"
> #include "itkImageFileWriter.h"
>
> int main( int argc, char * argv[] )
> {
>
> typedef short PixelType;
> const unsigned int Dimension = 3;
> typedef itk::Image< PixelType, Dimension > ImageType;
>
> typedef itk::MidsagittalPlaneExtractionImageFilter<ImageType,
> ImageType > FilterType;
>
> FilterType::Pointer filter = FilterType::New();
> return 0;
> }
>
> When I run the compiling (in Solaris 2.8, using G++ 3.1), I got the
> following error:
>
> Building object file CenterImageFilter.o...
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:
> In
> member function `void
> itk::MidsagittalPlaneExtractionImageFilter<TInputImage,
> TOutputImage>::GenerateData() [with TInputImage = main(int,
> char**)::ImageType, TOutputImage = main(int, char**)::ImageType]':
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:104:
> cannot
> convert `const itk::Vector<double, 3>' to `const double*' in assignment
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:116:
> warning: assignment
> to `unsigned int' from `double'
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:116:
> warning: argument
> to `unsigned int' from `double'
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:117:
> warning: assignment
> to `unsigned int' from `double'
> .../src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:117:
> warning: argument
> to `unsigned int' from `double'
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:123:
> warning: passing
> `double' for argument 1 of `void
> itk::CannyEdgeDetectionImageFilter<TInputImage,
> TOutputImage>::SetThreshold(TOutputImage::PixelType) [with TInputImage =
> main(int, char**)::ImageType, TOutputImage = main(int,
> char**)::ImageType]'
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:151:
> no
> matching function for call to `itk::Image<double, 3>::
> SetPhysicalToIndexTransform(itk::SmartPointer<itk::AffineTransform<double,
>
> 3> >&)'
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:152:
> no
> matching function for call to `itk::Image<double, 3>::
> SetIndexToPhysicalTransform(itk::SmartPointer<itk::AffineTransform<double,
>
> 3> >&)'
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:163:
> no
> matching function for call to `
> itk::MidsagittalPlaneExtractionImageFilter<main(int, char**)::ImageType,
> main(int, char**)::ImageType>::estimateAngle(itk::SmartPointer<const
> itk::Image<double, 3> >)'
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:719:
> candidates
> are: itk::estimateType*
> itk::MidsagittalPlaneExtractionImageFilter<TInputImage,
> TOutputImage>::estimateAngle(itk::ImageToImageFilter<TInputImage,
> TOutputImage>::InputImageConstPointer) [with TInputImage = main(int,
> char**)::ImageType, TOutputImage = main(int, char**)::ImageType]
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:224:
> no
> matching function for call to `itk::Image<double, 3>::
> SetPhysicalToIndexTransform(itk::SmartPointer<itk::AffineTransform<double,
>
> 3> >&)'
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:225:
> no
> matching function for call to `itk::Image<double, 3>::
> SetIndexToPhysicalTransform(itk::SmartPointer<itk::AffineTransform<double,
>
> 3> >&)'
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:243:
> no
> matching function for call to `
> itk::MidsagittalPlaneExtractionImageFilter<main(int, char**)::ImageType,
> main(int, char**)::ImageType>::estimateAngle(itk::SmartPointer<const
> itk::Image<double, 3> >)'
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:719:
> candidates
> are: itk::estimateType*
> itk::MidsagittalPlaneExtractionImageFilter<TInputImage,
> TOutputImage>::estimateAngle(itk::ImageToImageFilter<TInputImage,
> TOutputImage>::InputImageConstPointer) [with TInputImage = main(int,
> char**)::ImageType, TOutputImage = main(int, char**)::ImageType]
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:290:
> no
> matching function for call to `
> itk::MidsagittalPlaneExtractionImageFilter<main(int, char**)::ImageType,
> main(int, char**)::ImageType>::estimateShift(itk::Image<double, 3>*)'
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:1005:
> candidates
> are: double itk::MidsagittalPlaneExtractionImageFilter<TInputImage,
> TOutputImage>::estimateShift(itk::ImageToImageFilter<TInputImage,
> TOutputImage>::InputImageConstPointer) [with TInputImage = main(int,
> char**)::ImageType, TOutputImage = main(int, char**)::ImageType]
> .../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:308:
> `
> printVolumeTo' undeclared (first use this function)
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:308:
> (Each
> undeclared identifier is reported only once for each function it appears
> in.)
> ../ITK/src/InsightToolkit-2.0.0/Utilities/itksys/SystemTools.hxx:188:
> instantiated from here
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:316:
> no
> matching function for call to `
> itk::MidsagittalPlaneExtractionImageFilter<main(int, char**)::ImageType,
> main(int, char**)::ImageType>::estimateShift(itk::Image<double, 3>*)'
> .../ITK/src/InsightToolkit-2.0.0/Code/BasicFilters/itkMidsagittalPlaneExtractionImageFilter.txx:1005:
> candidates
> are: double itk::MidsagittalPlaneExtractionImageFilter<TInputImage,
> TOutputImage>::estimateShift(itk::ImageToImageFilter<TInputImage,
> TOutputImage>::InputImageConstPointer) [with TInputImage = main(int,
> char**)::ImageType, TOutputImage = main(int, char**)::ImageType]
> make[1]: *** [CenterImageFilter.o] Error 1
> make: *** [default_target] Error 2
>
> What do you think, what is the correct way to call that filter?
>
> Thanks a lot.
>
> Xueling
>
>
>
>
> On 7/18/05 12:20 PM, "Luis Ibanez" <luis.ibanez at kitware.com> wrote:
>
> >
> > Hi Xueling,
> >
> > Please look at the "MidsagittalPlaneExtraction" filter
> >
> >
> http://www.itk.org/Insight/Doxygen/html/classitk_1_1MidsagittalPlaneExtraction
> > ImageFilter.html
> >
> > Once you get the coordinates of the plane, you could
> > use it for centering the brain images.
> >
> > I guess that you have two brain images, so probably
> > a Transform that overlaps the mid-sagittal planes
> > of both images.
> >
> >
> > Regards,
> >
> >
> > Luis
> >
> >
> >
> > -------------------
> > Xueling Lu wrote:
> >
> >> Hi,
> >>
> >> I came to know ITK a few months ago and have been trying to use some
> of the
> >> registration routines. I wonder if ITK has a function that does brain
> >> centering. That is, position the brain in such a way that it
> maximizes the
> >> similarity between the right and left hemisphere.
> >>
> >> Thanks.
> >>
> >> Xueling
> >>
> >>
> >> _______________________________________________
> >> Insight-users mailing list
> >> Insight-users at itk.org
> >> http://www.itk.org/mailman/listinfo/insight-users
> >>
> >>
> >
> >
> >
More information about the IGSTK-Developers
mailing list