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轴

  • 相关阅读:
    swift 动画
    WCF身份验证二:基于消息安全模式的自定义身份验证
    WCF身份验证一:消息安全模式之<Certificate>身份验证
    SQL Server 事务与锁
    C# 6.0 的新特性
    SQL Cursor 游标的使用
    C# 几种读取MAC地址的方法
    C# 获取方法所在的 命名空间 类名 方法名
    SQL Server 日志清除
    C# 利用WMI对象获取物理内存和可用内存大小
  • 原文地址:https://www.cnblogs.com/qwcbeyond/p/2001557.html
Copyright © 2011-2022 走看看