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轴

  • 相关阅读:
    ASP.NET MVC学习之模型绑定(2)
    ASP.NET MVC学习之模型绑定(1)
    ASP.NET MVC学习之模型模板篇
    ASP.NET MVC学习之视图篇(2)
    ASP.NET MVC学习之视图篇(1)
    C++迭代器的使用和操作总结
    C++ 11 线程调用类的成员函数解决办法
    详解 C++11 lambda表达式
    C++11 学习笔记 std::function和bind绑定器
    C++11中的std::bind
  • 原文地址:https://www.cnblogs.com/qwcbeyond/p/2001557.html
Copyright © 2011-2022 走看看