2011-05-31 32 views
2

我想開發有關圖像處理的iPhone應用程序,訪問並在屏幕上顯示DICOM文件,如OsiriX。但我不知道要做什麼庫。如何訪問和顯示iPhone上的DICOM文件

我不知道OsiriX有開發者的圖書館或者插件。你知道嗎? (對不起敵我我的英文不好。)

諮詢我,請

謝謝。

回答

0

如果你願意考慮的MonoTouch,一個可能性是DICOM# - http://sourceforge.net/projects/dicom-cs/

+0

感謝您answer.But iPhone應用使用Objective-C的開發不C#。 – miniplayground 2011-05-31 07:45:19

+1

@miniplayground,用Mono,你可以在obj-c環境下編譯c#代碼。 – 2011-05-31 08:10:57

+0

@加里翠,真的!對不起,我不知道。 :) – miniplayground 2011-06-01 12:41:55

0

idoimaging.com列舉了一些DICOM兼容的庫。我會從該列表開始,看看是否有一個或多個可以輕鬆移植到iOS。

+0

謝謝,我試着去做。 – miniplayground 2011-05-31 07:46:16

0

更簡單的方法是找到c/C++ dicom庫(因爲您只需要lib來提取標籤值對和像素數據)。並且,將您的開發(我假設這是一個查看器)鏈接到該c/C++庫。請注意,對於j2k壓縮,如果不是另一個支持j2k的img庫,則可能需要更高級的dicom庫。

FYR(在C/C++ DICOM) [1] http://sourceforge.net/projects/gdcm/ [2] http://imebra.com/

0

Imebra被用C++編寫,但它包括目標C助手,允許直接從加載的數據集構建UIImage或NSImage對象。

您必須用.mm擴展名(而不是.m)重命名源文件,以便它們可以使用C++功能。

這裏是那麼該加載DICOM文件小的樣品得到的圖像作爲UIImage的(不施加爲了簡化呈現VOI/LUT):

using namespace puntoexe; 

// Open the file test.dcm for reading 
ptr<stream> readStream(new stream); 
readStream->openFile(NSStringToStringW(@"test.dcm"), std::ios::in); 
ptr<streamReader> reader(new streamReader(readStream)); 

// Parse the file into a dataSet structure 
ptr<imebra::dataSet> testDataSet = 
     imebra::codecs::codecFactory::getCodecFactory()->load(reader); 

// Get the patient name 
NSString* patientNameCharacter = StringWToNSString(testDataSet->getString(0x0010, 0, 0x0010, 0)); 

// Get the first image 
ptr<imebra::image> firstImage = testDataSet->getModalityImage(0); 
UIImage* myUIImage = getImage(firstImage, 0);