[Insight-users] about HessianRecursiveGaussianImageFilter

liu jianfei flair.liu at gmail.com
Wed Jan 25 14:49:14 EST 2006


Dear all

     I'm a newcomer of ITK library. I want to use
HessianRecursiveGaussianImageFilter to compute 3d image's eigenvalue
and eigenvector and do some analysis based on these values. In my
person opinion, the TOutputImage of class
"itk::HessianRecursiveGaussianImageFilter< TInputImage, TOutputImage
>" should be a matrix. Hence, I defined a matrix as the type of output
image. But it didn't work. I also tried the example of ITK test:

    typedef itk::HessianRecursiveGaussianImageFilter< VolumeMapType >
HessianFilterType;
    typedef HessianFilterType::OutputImageType myHessianImageType;
    HessianFilterType::Pointer hessian = HessianFilterType::New();
    float sigma = 3.0f;

    hessian->SetInput(rskvDFBMap);
    hessian->SetSigma(sigma);
    hessian->Update();
    myHessianImageType::Pointer outputImage = hessian->GetOutput();

    // Declare Iterator type for the output image
  typedef itk::ImageRegionIteratorWithIndex<
                                 myHessianImageType>  myOutputIteratorType;

  // Create an iterator for going through the output image
  myOutputIteratorType itg( outputImage,
                            outputImage->GetRequestedRegion() );

  //  Print the content of the result image
  int n=0;
  std::cout << " Result " << std::endl;
  itg.GoToBegin();
  while( !itg.IsAtEnd() )
    {
    std::cout << itg.Get() << " ";
    ++itg;
    n++;
    }

    cout << endl;
    cout << n << endl;

   however, I check the numer of the return value. It's equal to the
voxel's number of input image. I think it should be nine times of the
origin one, because hessian matrix should be as follows:

     Ixx  Ixy  Ixz
     Iyx  Iyy  Iyz
     Izx  Izy  Izz

According to symmetry, it is no less than 6 times of the origin image.
Can someone tell me how to use this class? Thanks..

--
Sincerly
Jianfei Liu


More information about the Insight-users mailing list