dicom

how to replace pixel data on same dicom file using pydicom to read it again with any dicom viewer?

。_饼干妹妹 提交于 2019-12-03 17:19:10
I want to treat some DICOM files, so I'm testing pydicom for my work, which I think is considerably useful. And now I want to load existing DICOM files, replace the pixel data array with another pixel array (e.g. preprocessing or literally another DICOM pixel array) and most of all, I want to treat it again with any DICOM viewer application. For this test, I used the tutorial code below. This code loads a test data file. The size of image is 64*64. The code below does subsampling from the original data. After that, the size of image is 8*8, and the result is saved to "after.dcm". But when I

How to calculate space between dicom slices for MPR?

主宰稳场 提交于 2019-12-03 16:02:58
Due to showing MPR view based on Dicoms. I've made a 3D array from series of dicom files. And I show it from Coronal and Sagittal sides. My 3D array includes: - z = count of dicoms - c = column value for every dicoms - r = Row value for every dicoms But I have a problem. When there is some space between slices, image is made by this way doesn't show a correct view. Because I can not think of simulation distance between them! I don't know how to calculate space between slices? I want to add extra space between slices. for example, If space between slices is 4. I have to add 4 time z inner

DICOM C-GET vs C-MOVE

大兔子大兔子 提交于 2019-12-03 12:13:53
问题 I have to develop a SCU (Service Class User) application for querying PACS and retrieve the DICOM images. Should I use C-GET or C-MOVE DICOM protocol to retrieve the images? 回答1: You can use either, but the preferred is C-Move. 回答2: The point is not only about security, but about implementation. In C-MOVE, the SCP list the supported transfer syntaxes for each image matching the previous query. Then the SCU agree with any. On the other side, in the C-GET, the SCU list its supporting transfer

how to display dicom image in matlab?

时光怂恿深爱的人放手 提交于 2019-12-03 12:07:20
I want to ask about this function in matlab dicomread example : a = dicomread ('m.dcm'); imshow(a) the image showed in the screen but it is very dark.....I wonder way it is dark and not normal. I checked with different dicom images but the problem remain. I hope you can help me and thanks in advance. If you are dealing with monochrome images, you can set a linear scaling between a minimum and maximum pixel value as follows: img = dicomread('filename'); imshow(img, [minAllowedPixValue maxAllowedPixValue]); Alternately, you can display the image at full dynamic range: imshow(img, []); I think

Create pydicom file from numpy array

蓝咒 提交于 2019-12-03 07:18:25
I'm trying to create a mew dicom image from a standard-sized (512 x 512 or 256 x 256) numpy array. It seems like this should be straightforward, and I've adapted my code from http://code.google.com/p/pydicom/source/browse/source/dicom/examples/write_new.py , which appears to execute the same process, but when I save the file, I can't view it either in RadiAnt or MicroDicom. import dicom, dicom.UID from dicom.dataset import Dataset, FileDataset def write_dicom(pixel_array,filename): file_meta = Dataset() ds = FileDataset(filename, {},file_meta = file_meta,preamble="\0"*128) ds.PixelData = pixel

DICOM C-GET vs C-MOVE

时光总嘲笑我的痴心妄想 提交于 2019-12-03 03:38:14
I have to develop a SCU (Service Class User) application for querying PACS and retrieve the DICOM images. Should I use C-GET or C-MOVE DICOM protocol to retrieve the images? Canopus You can use either, but the preferred is C-Move. The point is not only about security, but about implementation. In C-MOVE, the SCP list the supported transfer syntaxes for each image matching the previous query. Then the SCU agree with any. On the other side, in the C-GET, the SCU list its supporting transfer syntaxes before any query is made, and the SCP has to pick any and compromise to send whatever the SCU ask

Converting DICOM image to jpeg image

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My code is import java.awt.image.BufferedImage; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Iterator; import javax.imageio.ImageIO; import javax.imageio.ImageReader; import javax.imageio.stream.ImageInputStream; import org.dcm4che2.imageio.plugins.dcm.DicomImageReadParam; import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGImageEncoder; public class DicomToJpeg { public static void main(String

Where is possible download “.dcm” files for free? [closed]

一笑奈何 提交于 2019-12-03 02:44:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I'd like know a free database for free download of medical images in DICOM file format. Do you know any database? 回答1: The NIH (National Institute of Health) has a bunch of free DICOM databases (from actual real patients). Go check the collection descriptions for more information and for instruction on how to

JPEG Lossless in DICOM

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In the DICOM spec one of the Transfer Syntaxes is 1.2.840.10008.1.2.4.70 defined as JPEG Lossless, Nonhierarchical, First- Order Prediction (Processes 14 [Selection Value 1]) . What does "JPEG Lossless, Nonhierarchical, First- Order Prediction (Processes 14 [Selection Value 1])" mean? Is this format the same as JPEG-LS? This page seems to indicate that there is some difference (JPEG-LS is listed in the bottom section). Is is possible to read or write this format in Python? Looking over the docs for Pillow is no clear to me that the format is

DICOM: What's the point of SOPInstanceUID tag?

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: DICOM already provides a unique enough identifier for the Series (e.g. Series Instance UID ), so why also include one on the lower level objects (e.g. SOPInstanceUID )? What I find really annoying is the fact that when referencing other objects - for example when RTPlan object references RTStruct object via ReferencedStructureSetSequence / ReferencedSOPInstanceUID - it's done using the SOP Instance UID . However any of the DICOM SCPs - such as find/move - don't work with SOP Instance UID , they work with the Series Instance UID . So what