dicom

DICOM affine matrix transformation from image space to patient space in Matlab

房东的猫 提交于 2019-11-29 01:15:30
问题 From the nifti header its easy to get the affine matrix. However in the DICOM header there are lots of entries, but its unclear to me which entries describe the transformation of which parameter to which new space. I have found a tutorial which is quite detailed, but I cant find the entries they refer to. Also, that tutorial is written for Python, not Matlab. It lists these header entries: Entries needed: Image Position (0020,0032) Image Orientation (0020,0037) Pixel Spacing (0028,0030) I

c#: how to read parts of a file? (DICOM)

最后都变了- 提交于 2019-11-28 21:37:00
I would like to read a DICOM file in C#. I don't want to do anything fancy, I just for now would like to know how to read in the elements, but first I would actually like to know how to read the header to see if is a valid DICOM file . It consists of Binary Data Elements. The first 128 bytes are unused (set to zero), followed by the string 'DICM'. This is followed by header information, which is organized into groups. A sample DICOM header First 128 bytes: unused DICOM format. Followed by the characters 'D','I','C','M' Followed by extra header information such as: 0002,0000, File Meta Elements

What C++ library can I use to read pixels from DICOM images? [closed]

孤街醉人 提交于 2019-11-28 20:45:59
In C++ I want to read individual pixel values from DICOM images. There are in fact quite a few free libraries. If you prefer a higher-level COM envelope and are willing to purchase it, there are a few others - I'm familiar with RZDCX and DicomObjects , and googling around will get you some others. It's reasonably easy to access pixel values under the free DCMTK. If you want the raw Hounsfield data look here , and if you need the post-LUT (e.g., windowing) values - you can use DicomImage::getOutputData . There this library: http://dicom.offis.de/dcmtk If you're using x86 or x86_64, then the

How to translate DICOM image width and level to JPEG brightness and contrast?

北慕城南 提交于 2019-11-28 11:37:36
If we convert a DICOM image to JPEG, what is the way to translate / calculate Image width = 500, Window Level = 2000 of the original DICOM to JPEG's brightness and contrast? There's no direct answer to your question, since DICOM and JPEG have different ways to define brightness/contrast. JPEG stores true color values (RGB), while DICOM have raw pixel values, uncolored most of the time. A DICOM viewer renders it by reading the Window Level and Width and convert this to color. That is, you can say that you want your JPEG to have its pixel colors as if it was rendered by a viewer. In your case

Interpolation between two images with different pixelsize

别来无恙 提交于 2019-11-28 11:08:43
问题 For my application, I want to interpolate between two images(CT to PET). Therefore I map between them like that: [X,Y,Z] = ndgrid(linspace(1,size(imagedata_ct,1),size_pet(1)),... linspace(1,size(imagedata_ct,2),size_pet(2)),... linspace(1,size(imagedata_ct,3),size_pet(3))); new_imageData_CT=interp3(imagedata_ct,X,Y,Z,'nearest',-1024); The size of my new image new_imageData_CT is similar to PET image. The problem is that data of my new image is not correct scaled. So it is compressed. I think

How to convert JPG image to DICOM file using dcm4che-3.2.1?

假如想象 提交于 2019-11-28 10:38:26
I can set the attributes and create the dicom file, but I can not write the image to the dicom file? I've tried it with an image I have and it works but I expect it won't work for RGB images. Something like this though BufferedImage jpg = ImageIO.read(new File("myjpg.jpg")); //Convert the image to a byte array DataBufferUShort buff = (DataBufferUShort) jpg.getData().getDataBuffer(); short[] data = buff.getData(); ByteBuffer byteBuf = ByteBuffer.allocate(2*data.length); int i = 0; while (data.length > i) { byteBuf.putShort(data[i]); i++; } //Copy a header DicomInputStream dis = new

How to convert dicom file to jpg conversion

旧城冷巷雨未停 提交于 2019-11-28 10:34:51
How we can convert a dicom file(.dcm) to a jpeg image using java? Here is my code: import java.io.File; import java.io.IOException; import org.dcm4che2.tool.dcm2jpg.Dcm2Jpg; public class MainClass { public static void main(String[] args) throws IOException{ Dcm2Jpg conv = new Dcm2Jpg(); conv.convert(new File("C:\\Users\\lijo.joseph\\Desktop\\Dicom\\IM-0001-0001.dcm"), new File("C:\\Users\\lijo.joseph\\Desktop\\Dicom\\IM-0001-0001.jpg")); } } and i am getting the following error while running the project Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli

What could be the reason for bad dicom image plot

邮差的信 提交于 2019-11-28 06:50:30
问题 What could be the reason that the dicom file of this usual x-ray is getting plotted in a messed up manner: The algorithm used is as follows: The original image matrix is 3d: int [1:2014, 1:2014, 1:3] 110 51 99 113 52 101 111 53 102 110 ... This rgb is converted to gray scale by formula: gray = 0.3*mat[,,1] + 0.59*mat[,,2] + 0.11*mat[,,3] ; And then it is plotted after specifying colors as: grey(0:64/64) Where could be the error? I am using oro.dicom package in R with function: jj =

.NET DICOM Libraries [closed]

半世苍凉 提交于 2019-11-28 03:58:21
I have used DICOM using MERGECOM when I was in GE Healthcare in 2005. After that I don't have much knowledge in the DICOM system. Now we have a requirement for implementing PACS system using .NET platform. Can you recommend a decent, good, community supported .NET based DICOM library or framework? or Do you know any commercial libraries for DICOM which support .NET? The ClearCanvas library is a good option. I'm a bit biased because I work on it, but its actively maintained, is used by a number of commercial products, and is used by the other ClearCanvas products. The ClearCanvas products are

Has anyone used the Papyrus toolkit in an iPhone / iPad application to view DICOM images?

半城伤御伤魂 提交于 2019-11-28 02:22:48
问题 Does anyone have any experience integrating the Papyrus toolkit in an iPhone / iPad application in order to display DICOM medical images? I have the Papyrus toolkit integrated with my Objective-C code, but I am struggling to get it to display a DICOM image. Does anyone have any tips they can share? 回答1: Papyrus is severely outdated, as it was last updated in 1996. Here's a link for the manual. Instead, I recommend porting the DCMFramework currently bundled with OsiriX to the iOS instead. This