simpleitk

Install SimpleElastix on Windows for Python

空扰寡人 提交于 2021-02-08 10:43:03
问题 It seems some people have reported this on GitHub but I still couldn't find a clear solution to it - in the last step of installing the python module on Windows, there is no such folder called "/Wrapping/Python/Packaging" under "SimpleITK-build", and no file called "setup.py" in it. People have pointed out that it may be an issue coming from the improper Python Path. I tried adding Python Path under Anaconda to the system so that it can be accessed through cmd, but it didn't solve the problem

Install SimpleElastix on Windows for Python

喜你入骨 提交于 2021-02-08 10:41:19
问题 It seems some people have reported this on GitHub but I still couldn't find a clear solution to it - in the last step of installing the python module on Windows, there is no such folder called "/Wrapping/Python/Packaging" under "SimpleITK-build", and no file called "setup.py" in it. People have pointed out that it may be an issue coming from the improper Python Path. I tried adding Python Path under Anaconda to the system so that it can be accessed through cmd, but it didn't solve the problem

SimpleITK Resize images

[亡魂溺海] 提交于 2021-02-04 14:08:07
问题 I have a set o 3D volumes that I am reading with SimpleITK import SimpleITK as sitk for filename in filenames: image = sitk.ReadImage(filename) Each of the volumes has different size, spacing, origin and direction. This code yields different values for different images: print(image.GetSize()) print(image.GetOrigin()) print(image.GetSpacing()) print(image.GetDirection()) My question is: how do I transform the images to have the same size and spacing so that they all have the same resolution

SimpleITK Resize images

社会主义新天地 提交于 2021-02-04 14:06:43
问题 I have a set o 3D volumes that I am reading with SimpleITK import SimpleITK as sitk for filename in filenames: image = sitk.ReadImage(filename) Each of the volumes has different size, spacing, origin and direction. This code yields different values for different images: print(image.GetSize()) print(image.GetOrigin()) print(image.GetSpacing()) print(image.GetDirection()) My question is: how do I transform the images to have the same size and spacing so that they all have the same resolution

SimpleITK Resize images

故事扮演 提交于 2021-02-04 14:05:31
问题 I have a set o 3D volumes that I am reading with SimpleITK import SimpleITK as sitk for filename in filenames: image = sitk.ReadImage(filename) Each of the volumes has different size, spacing, origin and direction. This code yields different values for different images: print(image.GetSize()) print(image.GetOrigin()) print(image.GetSpacing()) print(image.GetDirection()) My question is: how do I transform the images to have the same size and spacing so that they all have the same resolution

How Do I Change the Axis SimpleITK::ImageSeriesWriter Using?

不想你离开。 提交于 2021-01-29 05:57:06
问题 The SimpleITK::ImageSeriesWriter default to slice given 3D volume along Z-axis and write slices of 2D images in XY view. How do I change the axis so that the output is in XZ or YZ view? In another word, if the default Z axis slices are in Axial view, how do I get the slices of Coronal and Sagittal view? I tried the GitHub:FNNDSC/med2image's output xyz function. But the images array are blindly written, so sometimes the X and Y are transposed, or one of the axis are reversed(flipped). So I

Simple ITK Problem when saving deformation field : the deformation field is empty

浪尽此生 提交于 2020-06-17 14:54:35
问题 i'am looking for help with simpleITK, I'am working with NII files in order to calculate the deformation field. I use Python and simpleITK (simpleitk 1.2.0rc2.dev1167+gd4cf2). I can easily register my images or volumes but i cannot get the deformation field ! When i print it in the console simpleITK tells me that the vector is an image as predicted but when i try to save it with "WriteImage" wich is a sitk member function, the writtent image is full of null values the code used to do that :

Simple ITK Problem when saving deformation field : the deformation field is empty

守給你的承諾、 提交于 2020-06-17 14:54:24
问题 i'am looking for help with simpleITK, I'am working with NII files in order to calculate the deformation field. I use Python and simpleITK (simpleitk 1.2.0rc2.dev1167+gd4cf2). I can easily register my images or volumes but i cannot get the deformation field ! When i print it in the console simpleITK tells me that the vector is an image as predicted but when i try to save it with "WriteImage" wich is a sitk member function, the writtent image is full of null values the code used to do that :

How to do histogram equalization to DICOM images read with SimpleITK

浪尽此生 提交于 2020-03-03 08:05:08
问题 I'm trying to do histogram equalization to all images read from a *.nii.gz file. I have tried this code: import SimpleITK as sitk flair_file = '/content/gdrive/My Drive/Colab Notebooks/.../FLAIR.nii.gz' images = sitk.ReadImage(flair_file) print("Width: ", images.GetWidth()) print("Height:", images.GetHeight()) print("Depth: ", images.GetDepth()) print("Dimension:", images.GetDimension()) print("Pixel ID: ", images.GetPixelIDValue()) print("Pixel ID Type:", images.GetPixelIDTypeAsString())

How are the spacing value of the z dimension and thickness (0018, 0050) different in dicom series?

懵懂的女人 提交于 2019-12-19 10:20:18
问题 I've been studying some dicom series and find that the thickness attribute and the itkimage.GetSpacing()[2] value are not always consistent. For example the thickness (0018, 0050) value encoded in the dcm file is 1.5 mm but the corresponding spacing indicated simpleITK on z axis is 1.00 . Then what value should I use to indicate the physical distance between adjacent voxel center s on the z axis? If they are different things then What do spacings actually mean? I retrieve thickness and