zoukankan      html  css  js  c++  java
  • VTK向ITK转换后输出序列dicom图片的问题

    昨晚发现用geomagic抽出的面模型有个很大的问题——刚好反转过来的!!也就是说。。。肝跑到左边去了。。。胃在右边。。。。这让我百思不得其解

    还好google给我搜对关键词了,原来是vtk和itk的坐标系不一样的问题,下面是引用

    VTK uses the computer graphics standard of having the origin
         at the upper left of a screen
     
    ITK uses the mathematical standard of having the origin on
         the lower left.
     
    Note however that all this is irrelevant since ITK does
    provide any visualization functionalities. At the end
    what matters is how all the elements map to physical space.

    VTK是左上角 ITK是左下角。。。 这就是问题的来源了    

    This is a common problem. VTK and ITK use different conventions. ITK
    uses image convention where the first pixel in memory if shown in the
    upper left of the displayed image. VTK uses computer graphics
    convention where the first pixel in memory is shown in the lower left
    of the displayed image.

    The ITK convention conforms to radiology convention.

    You can use vtkImageFlip to flip the vtk images about the y axis.

    There are other differences. VTK images do not honor the orientation
    of DICOM images while ITK images do.

    如何解决呢,使用vtkImageFlip这个类,把整个volume按Y轴反转就行了。。。。如此简单啊

    vtkSmartPointer <vtkImageFlip> imageflip =vtkSmartPointer<vtkImageFlip>::New();
     imageflip->SetInput(image);
     imageflip->SetFilteredAxes(1);//Y轴

  • 相关阅读:
    CentOS网络接口配置文件ifcfgeth详解
    python session
    Plateau problem
    Maximum subsequence sum
    回溯法解符号三角形
    切莫开一块地荒一块地
    BackTracking_Fixed sum for array elements
    DP_LCS
    Shortest distance between two arrays
    BSP 面试总结
  • 原文地址:https://www.cnblogs.com/qwcbeyond/p/2001557.html
Copyright © 2011-2022 走看看