Load dicom in another android application

 ̄綄美尐妖づ 提交于 2020-01-07 02:30:41

问题


Is there a way to load a Dicom image using an app like "Droid Dicom Viewer". I would like to be able pass an .dcm file from my app and load it in another app to view it.

Can this be done with intents?


回答1:


You should be able to open DICOM files like any other registered MIME type with an intent. I wouldn't depend on "Droid Dicom Viewer" to view your files since it fails more often than it succeeds.

(assumes that sDICOMFile is a string containing the path to the file)

final Intent dicom_intent = new Intent(android.content.Intent.ACTION_VIEW);
dicom_intent.setDataAndType(Uri.parse("file://" + sDICOMFile), "Application/dicom");
startActivity(dicom_intent);


来源:https://stackoverflow.com/questions/9151305/load-dicom-in-another-android-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!