# CenterLine.vtk file is not aligned properly 3D view in slicer4.13

**URL:** <https://discourse.slicer.org/t/centerline-vtk-file-is-not-aligned-properly-3d-view-in-slicer4-13/21975>\
**Category:** Development\
**Tags:** vtk, python\
**Created:** [February 15, 2022, 6:42am UTC](https://discourse.slicer.org/t/centerline-vtk-file-is-not-aligned-properly-3d-view-in-slicer4-13/21975 "2022-02-15T06:42:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahesh\_Timmanagoudar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mahesh_timmanagoudar/32/10914_2.png) [@Mahesh\_Timmanagoudar](https://discourse.slicer.org/u/Mahesh_Timmanagoudar)\
**Post date:** [February 15, 2022, 6:42am UTC](https://discourse.slicer.org/t/centerline-vtk-file-is-not-aligned-properly-3d-view-in-slicer4-13/21975/1 "2022-02-15T06:42:38Z")

</div>

I have generated VTK file using slicer 4.13 version.

The VTK file looks like below.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/b/ebb363c9b20568ac5892de5c5f249e3f14d99c0e.png)

If i try to display above file in 3D view means. It wont align using both LPS and RAS option.  
It will be like below in slicer view.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/8/d80163b2767c5f1ce0e044d5f67d464a223b747d.jpeg)

If i change the vtk file like below. (Removed - SPACE=LPS) (second line of vtk file).  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/b/5b93e77b45cc05a0b315531be43410cd9e6bc85f.png)

If i try to display the above modified file in slicer using LPS option. Its properly aligning like below.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/d/dd01d008ed10fa80cc1a70161885784b90ffb818.png)

May i know where we can modified these vtk files using code so that it will properly align?

Any suggestion how can i fix this problem?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 4, 2022, 4:51am UTC](https://discourse.slicer.org/t/centerline-vtk-file-is-not-aligned-properly-3d-view-in-slicer4-13/21975/2 "2022-03-04T04:51:58Z")

</div>

Is the input segmentation or model under a transform?

If you create the centerline using SlicerVMTK extension’s Extract centerline module does the centerline appear at correct position? If you save the scene and reload the scene (.mrml or .mrb file) then does the centerline appear in the correct position? If you save the centerline and the surface model and then load the files do they appear in the same position?
