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轴

  • 相关阅读:
    怎么删除json 键值对
    解决html 图片缓存问题
    美工常用的网站分享
    小程序授权页面
    BitMap原理
    css页面加载动画
    可能这些是你想要的H5软键盘兼容方案
    关于范式 :1NF 2NF 3NF等
    Python3学习DAY4
    DTD相关
  • 原文地址:https://www.cnblogs.com/qwcbeyond/p/2001557.html
Copyright © 2011-2022 走看看