在 ResearchKit 中捕捉皮疹图像

Capture an image of a skin rash in ResearchKit

我正在为狼疮患者开发 Apple ResearchKit 应用程序。我已经完成了一些调查和步行任务 activity。

现在我需要经常拍摄皮疹图像,仅将其保存在应用程序中(而不是照片应用程序中),并将最新图像与上次拍摄的图像进行比较。

我需要知道我是否可以使用 ResearchKit 来完成上述任务。如何打开 iPhone 相机并使用 ResearchKit 捕捉图像?我知道图像比较是 ResearchKit 之外的一项任务。但我的首要任务是在 ResearchKit 中捕获图像。是否可以使用 ResearchKit 或我是否必须在 RK 的范围之外执行此任务。 请向我提供任何代码或任何 link(如果可用)。

提前致谢

@prateek ResearchKit 有一个图像捕获步骤,可以满足您的要求。您还必须在任务视图控制器中为捕获的图像声明一个输出目录。下面的示例代码。

ORKImageCaptureStep *imageCaptureStep = [[ORKImageCaptureStep alloc] initWithIdentifier:@"ImageCaptureStep"];
imageCaptureStep.title = /*Title for the step*/;

ORKTaskViewController *taskViewController = [[ORKTaskViewController alloc] initWithTask:imageCaptureStep taskRunUUID:nil];
taskViewController.delegate = self;
taskViewController.outputDirectory = /*where to store your image*/;

并且不要忘记为任务视图控制器实现 "ORKTaskViewControllerDelegate"。