1

I am working on Apple ResearchKit application for Lupus patients. I have already put some surveys and a task for walking activity.

Now I need capture image of a skin rash at frequent intervals, save it inside the app only (not in photos app) and compare the newest image with the last image taken.

I need to know if I can use ResearchKit to do the above said task. How can I open the iPhone camera and capture an image using ResearchKit? I know image comparison is a task outside ResearchKit. But my first priority is capturing the image in ResearchKit. Is it possible to use ResearchKit or do I have to do this task outside the scope of RK. Please provide me with any code or any link if available.

Thanks in advance

Prateek Chaubey
  • 653
  • 2
  • 10
  • 24
  • 2
    ResearchKit has a [image capture step](https://github.com/ResearchKit/ResearchKit/blob/7f106898e23dd00057dc08a77591913f851f6bd7/ResearchKit/Common/ORKImageCaptureStep.h) – Yuan Nov 09 '15 at 19:44

1 Answers1

2

@prateek ResearchKit has a Image Capture step which can do what you require. You'll also have to declare an output directory for the captured image in your task view controller. Sample code below.

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*/;

And don't forget to implement the "ORKTaskViewControllerDelegate" for the task view controller.

Mj.B
  • 191
  • 9