Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

SimpleITK interpolation

import SimpleITK as sitk
reader = sitk.ImageSeriesReader()
dicom_names = reader.GetGDCMSeriesFileNames(case_path) reader.SetFileNames(dicom_names)
image = reader.Execute()
resample = sitk.ResampleImageFilter()
resample.SetOutputDirection(image.GetDirection())
resample.SetOutputOrigin(image.GetOrigin())
newspacing = [1, 1, 1]
resample.SetOutputSpacing(newspacing)
newimage = resample.Execute(image)
12345678910
Source by www.programmersought.com #
 
PREVIOUS NEXT
Tagged: #SimpleITK #interpolation
ADD COMMENT
Topic
Name
8+8 =