Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java - using recursion if possible Tumor Detection One of the challenges of medical diagnosis is that of spotting anomalies among the various images

In Java - using recursion if possible

Tumor Detection

One of the challenges of medical diagnosis is that of spotting anomalies among the various images now available to physicians. Recent algorithmic developments have made it possible for software to spot many questionable situations and draw the physicians attention to just such areas. In this problem, you will be given an image of one slice from a scan and will be asked to search within that image for a particular pattern one that is indicative of a possible tumor.

In this problem, you will be given one slice of a scan from a patient as a series of 1s and 0s. The coordinate system of the scan is such that the upper left corner is (0, 0) and pairs are specified in (row, column) order. [Note that (row, column) is NOT the same as (x, y).] You will also be given a pattern that corresponds to the possible tumor. The figures below show the images that are described by the data in the first example.

image text in transcribed

In this case, the 1s are shown in black and the 0s are in white. The possible tumor can be found anchored (by its upper left corner) at the square with diagonally stripped. This is square (3, 5). Note that for a possible tumor to be detected both white and black squares must match the pattern. A tumor may, however, be rotated counterclockwise within the image. [There is no such case in the image above, but there is in the second sample run shown below.] Your problem is to determine all of the locations of interest (i.e. possible tumors) within the given scanned image.

Input

The input will consist of two consecutive sequences of lines of text containing 0s and 1s only. The first sequence contains the scan, while the second contains the possible tumor. Both scans and tumors will always be square, i.e. they will have the same number of bits along each dimension. The maximum size for a scan is 100x100; for a tumor it is 8x8. The minimum size for each is 2x2.

Output

The output consists of a list of the possible tumors detected within the scan. For each tumor, you are to indicate the location of its anchor point (upper left corner) and the number of degrees (0, 90, 180, 270) that the input tumor was rotated counter-clockwise to determine the match. This data is to be formatted as in the first two examples, but the list may appear in any order in the case of more than one possible tumor. In the event that no tumor is found, the message from the third example is to be printed.

image text in transcribed

image text in transcribed

Possible Tumor Patient Scan Possible Tumor Patient Scan

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

Discuss various aspects of the training design process.

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago