VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
- Jessica Blair
- Posts: 37
- Joined: Thu Sep 19, 2019 6:09 pm
VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hello all,
I was wondering if anyone has had issues with downloading DICOM images into SimVascular.
For instance, on my end, one DICOM image is on a different plane than the other 9 DICOM images, shown below. On my mentor's end, they are on the correct plane. I have downloaded the DICOM images through our shared link.
Thank you for your time!
Take care and stay healthy,
Jessica
I was wondering if anyone has had issues with downloading DICOM images into SimVascular.
For instance, on my end, one DICOM image is on a different plane than the other 9 DICOM images, shown below. On my mentor's end, they are on the correct plane. I have downloaded the DICOM images through our shared link.
Thank you for your time!
Take care and stay healthy,
Jessica
- Attachments
-
- differentplanes.png (229.93 KiB) Viewed 370 times
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hi Jessica,
Looking at the attached picture it seems that you have two SV projects loaded. I think this is causing problems with the image slice plane, doesn't know which image to use maybe.
Cheers,
Dave
Looking at the attached picture it seems that you have two SV projects loaded. I think this is causing problems with the image slice plane, doesn't know which image to use maybe.
Cheers,
Dave
- Jessica Blair
- Posts: 37
- Joined: Thu Sep 19, 2019 6:09 pm
Re: VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hi David,
Yes, I had two projects open just to show the differences in the 3D planes for each project. When I import these models to ParaView, they are still on different planes. The original hope was to use all 10 models for the valves on this patient, and create an animation with the surface models created from SimVascular. Unfortunately, the models for the 10% are different than the 20-100% models. I have attached a screenshot of the exported surface models in ParaView.
Thank you!
Yes, I had two projects open just to show the differences in the 3D planes for each project. When I import these models to ParaView, they are still on different planes. The original hope was to use all 10 models for the valves on this patient, and create an animation with the surface models created from SimVascular. Unfortunately, the models for the 10% are different than the 20-100% models. I have attached a screenshot of the exported surface models in ParaView.
Thank you!
- Attachments
-
- Screen Shot 2021-04-21 at 12.35.17 PM.png (36.15 KiB) Viewed 327 times
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hi Jessica,
This seems to be caused either from different scaling or that the origin is different for the two images. You can look at the header of the .vti file to see this
If you upload the image .vti files someplace I can download them I'll have a look.
Cheers,
Dave
This seems to be caused either from different scaling or that the origin is different for the two images. You can look at the header of the .vti file to see this
Code: Select all
more demo.vti
<?xml version="1.0"?>
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<ImageData WholeExtent="0 511 0 63 0 511" Origin="-20.3961 -5.11 -22.9461" Spacing="0.078125 0.2 0.078125">
Cheers,
Dave
- Jessica Blair
- Posts: 37
- Joined: Thu Sep 19, 2019 6:09 pm
Re: VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hi Dave,
Thank you for the reply. I was viewing the bounds for each VTI image on ParaView and noticed that the 20-100% X, Y, and Z bounds start at a negative number instead of starting at 0 as the bounds for 10% X, Y, and Z do. How would I view the header of .vti file?
I have emailed you both VTI files and appreciate your feedback and help.
Thank you for the reply. I was viewing the bounds for each VTI image on ParaView and noticed that the 20-100% X, Y, and Z bounds start at a negative number instead of starting at 0 as the bounds for 10% X, Y, and Z do. How would I view the header of .vti file?
I have emailed you both VTI files and appreciate your feedback and help.
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hi Jessica,
You can use the Linux more command to look at the .vti headers.
The two images do indeed have different origins
You can change the image origin using the SV Python API. See https://github.com/SimVascular/SimVascu ... -origin.py
Cheers,
Dave
You can use the Linux more command to look at the .vti headers.
The two images do indeed have different origins
Code: Select all
$ more TAV_110%.vti
<?xml version="1.0"?>
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
<ImageData WholeExtent="0 511 0 511 0 223" Origin="-67.100997925 -103.94000244 -214.07600403" Spacing="0.332031 0.332031 0.625">
$ more TAV_20%.vti
<?xml version="1.0"?>
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
<ImageData WholeExtent="0 511 0 511 0 223" Origin="0 0 0" Spacing="0.332031 0.332031 0.625">
Cheers,
Dave
- Jessica Blair
- Posts: 37
- Joined: Thu Sep 19, 2019 6:09 pm
Re: VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hi Dave,
I am actually not too familiar with GitHub. I have created an account and opened the app on the desktop, trying to run via my terminal (I have a Mac) and the command line won't run. On the code in the GitHub app I cannot edit anything either, but I see where I should be able to put the name for my .vti folder.
I opened textedit to adjust the line with "write_file_name" and copy and pasted this to my terminal, but it still wouldn't run.
Sorry for the inconvenience! I looked online but am still having trouble, do you have any suggestions?
Thank you in advance.
I am actually not too familiar with GitHub. I have created an account and opened the app on the desktop, trying to run via my terminal (I have a Mac) and the command line won't run. On the code in the GitHub app I cannot edit anything either, but I see where I should be able to put the name for my .vti folder.
I opened textedit to adjust the line with "write_file_name" and copy and pasted this to my terminal, but it still wouldn't run.
Sorry for the inconvenience! I looked online but am still having trouble, do you have any suggestions?
Thank you in advance.
- David Parker
- Posts: 1719
- Joined: Tue Aug 23, 2005 2:43 pm
Re: VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hi Jessica,
You should spend a little time learning how to use git; it is very useful! I've added a Python script here https://github.com/ktbolt/cardiovascula ... gin/python
To get a copy of the Python script execute the following command in a terminal
The script is in the cardiovascular/set-image-origin/python directory.
You will need VTK installed to run this script: pip install vtk
Cheers,
Dave
You should spend a little time learning how to use git; it is very useful! I've added a Python script here https://github.com/ktbolt/cardiovascula ... gin/python
To get a copy of the Python script execute the following command in a terminal
Code: Select all
git clone https://github.com/ktbolt/cardiovascular
You will need VTK installed to run this script: pip install vtk
Cheers,
Dave
- Jessica Blair
- Posts: 37
- Joined: Thu Sep 19, 2019 6:09 pm
Re: VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hi Dave,
I'll take a look at that and adjust if need be. Thank you for the links!
Take care and stay healthy,
Jessica
I'll take a look at that and adjust if need be. Thank you for the links!
Take care and stay healthy,
Jessica
- Justin Mel Cortez
- Posts: 2
- Joined: Wed Sep 30, 2020 12:16 pm
Re: VTI Sizing Issue - macOS version 11.2.3 - SV version 2021.02.06
Hey David,
I was able to run the code you provided in PyCharm and it was successfully able to reset the coordinates properly for the .vti files. Is there a chance that the code can be edited so that it could also translate other files, such as the path (.pth) and segmentation (.ctgr) files as well? Or will I have to manually redo all of the segmentations and paths with this newly translated image?
Thanks all,
Justin
I was able to run the code you provided in PyCharm and it was successfully able to reset the coordinates properly for the .vti files. Is there a chance that the code can be edited so that it could also translate other files, such as the path (.pth) and segmentation (.ctgr) files as well? Or will I have to manually redo all of the segmentations and paths with this newly translated image?
Thanks all,
Justin