dicom

remove pixel annotations in dicom image

♀尐吖头ヾ 提交于 2019-12-09 00:19:17
问题 I am analyzing medical images. All images have a marker with the position. It looks like this It is the "TRH RMLO" annotation in this image, but it can be different in other images. Also the size varies. The image is cropped but you see that the tissue is starting on the right side. I found that the presence of these markers distort my analysis. How can I remove them? I load the image in python like this import dicom import numpy as np img = dicom.read_file(my_image.dcm) img_array = img.pixel

How to downgrade 16 bit depth gray scale to 8 bit depth image (rgb 24) [closed]

大兔子大兔子 提交于 2019-12-08 15:32:07
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year . So I am working in a WPF project. I have two DICOM Images(X-ray(16 bits gray scale) Image and an Optical(24 bit RGB) Image). What I want I wanna blend the two image one on the another by changing opacity. Its like increase or decrease opacity between the two images. If I wanna blend these two images,

Computing the size of UID possibilities

跟風遠走 提交于 2019-12-08 14:45:13
问题 Per DICOM specification, a UID is defined by: 9.1 UID Encoding Rules. In other words the following are valid DICOM UIDs: "1.2.3.4.5" "1.3.6.1.4.35045.103501438824148998807202626810206788999" "1.2.826.0.1.3680043.2.1143.5028470438645158236649541857909059554" while the following are illegal DICOM UIDs: ".1.2.3.4.5" "1..2.3.4.5" "1.2.3.4.5." "1.2.3.4.05" "12345" "1.2.826.0.1.3680043.2.1143.50284704386451582366495418579090595540" Therefore I know that the string is at most 64 bytes, and should

DCMTK C++ : how to get data pixels from dicom files

人盡茶涼 提交于 2019-12-08 07:00:53
问题 I'm using DCMTK for a C++ project and want to retrieve pixels from dicom files. I used thid basic example : DicomImage *image = new DicomImage("test.dcm"); if (image != NULL) { if (image->getStatus() == EIS_Normal) { if (image->isMonochrome()) { image->setMinMaxWindow(); Uint8 *pixelData = (Uint8 *)(image->getOutputData(8 /* bits */)); if (pixelData != NULL) { /* do something useful with the pixel data */ } } } else cerr << "Error: cannot load DICOM image (" << DicomImage::getString(image-

error in reading a DICOM file using readDICOM in R

强颜欢笑 提交于 2019-12-08 06:40:48
问题 I am trying to read multiple DICOM files from a directory. I installed the oro.dicom package and I use readDICOM function for this purpose: dicom_file <- readDICOM("3_TR2000_300VOLUMES") But I get this error: Error in names(hdr) <- c("group", "element", "name", "code", "length", : 'names' attribute [7] must be the same length as the vector [6] Does anyone know what the problem might be and how to solve it? Thank you. 回答1: I looked into the source of the readDICOM function. Apparently this

How can I do a Query/Retrieve in JAVA?

爱⌒轻易说出口 提交于 2019-12-08 05:57:41
问题 I need to acces to the DicomObjects that are stored in a DCM4CHEE PACS using JAVA (NetBeans) . So far, I think that I have to use the class DCMqr from DCM4CHE library, but I can't find any example and I don't know how to use it. 回答1: The dcm4che toolkit usage doc for dcmqr is available here The toolkit has a dcmqr class which provides all of the functionality to do a C-FIND or C-MOVE from a DCM4CHEE PACS (or any other DICOM compliant PACS). Simply pass the AE Title, host and port and possibly

how to open .dcm images in ios app using Objective C [duplicate]

余生长醉 提交于 2019-12-08 02:58:21
问题 This question already has answers here : How do I extract pixel data from DICOM files on iOS? (4 answers) Closed 2 years ago . I want to create app in which .dcm images are open in ios. can anyone tell me how to open .dcm images in ios app.its like a images viewer that only open .dcm images. You anyone have any idea about it ??? your help should be appreciated. thanks, 回答1: dcmtk can also be built for ios. I have tested some sample apps and ported my own build to ios. Also, you can just build

Is the “Other Word” VR legal for an 8-bit RGB image?

僤鯓⒐⒋嵵緔 提交于 2019-12-07 21:14:17
问题 Recently I have seen some color DICOM files with big endian transfer syntax, where pixel data had OW (Other Word) value representation. Byte order in file is R1G1B1R2G2B2 etc AFAIK, according to DICOM standard (part 5, Section 8.1, The only difference between OW and OB being that OB, a string of bytes, shall be unaffected by Byte Ordering ), when converting this image to little endian, the byte order should be changed so that it will become G1R1R2B2B2G2 etc but this does not make any sense!

How to fix encoding issues of pydicom in python

风流意气都作罢 提交于 2019-12-07 20:31:48
问题 This is the code: import dicom ds = dicom.read_file(FILE_PATH) print(ds) Error: LookupError: unknown encoding: ISO 2022 IR 100 When using pydicom in order to look at data, I got the error above. I found 'ISO 2022 IR 100': 'latin_1' ,according to here. However, I didn't get how to fix this problem. Can you help me to solve this error? 回答1: As indicated in the comments, the culprit was an out-of-date version of pydicom. Upgrading to a more recent version fixed this issue. 来源: https:/

将Dicom数据集转换成raw+mhd文件

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 18:27:04
问题 原本项目用的都是自己用程序合并的raw和info.txt,info.txt里只包含Dimension和Spacing。 info.txt格式如下: 512 512 49 0.693359 0.693359 3 VNet框架 需要使用到raw和mhd文件,mhd文件格式如下: ObjectType = Image NDims = 3 BinaryData = True BinaryDataByteOrderMSB = False CompressedData = False TransformMatrix = 1 0 0 0 1 0 0 0 1 Offset = - 175.153 - 337.153 - 54.1 CenterOfRotation = 0 0 0 AnatomicalOrientation = RAI ElementSpacing = 0.693359 0.693359 3 DimSize = 512 512 49 ElementType = MET_SHORT ElementDataFile = images- 1 .raw 各种参数的定义官方文档 ITK MetaIO Document 也没很具体的解释。 解决方案1 昨天发现itk-snap可以读取一个系列的Dicom数据,然后再导出成MetaImage(即raw+mhd)格式。