Menu

[Solved]Java Using Recursion Possible Tumor Detection One Challenges Medical Diagnosis Spotting An Q37117616

In Java – using recursion if possible:

Tumor Detection

One of the challenges of medical diagnosis is that of spottinganomalies among the various images now available to physicians.Recent algorithmic developments have made it possible for softwareto spot many questionable situations and draw the physician’sattention to just such areas. In this problem, you will be given animage of one slice from a scan and will be asked to search withinthat image for a particular pattern – one that is indicative of apossible tumor.

In this problem, you will be given one slice of a scan from apatient as a series of 1’s and 0’s. The coordinate system of thescan is such that the upper left corner is (0, 0) and pairs arespecified in (row, column) order. [Note that (row, column) is NOTthe same as (x, y).] You will also be given a pattern thatcorresponds to the possible tumor. The figures below show theimages that are described by the data in the firstexample.Possible Tumor Patient Scan

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

Input

The input will consist of two consecutive sequences of lines oftext containing 0’s and 1’s only. The first sequence contains thescan, while the second contains the possible tumor. Both scans andtumors will always be “square,” i.e. they will have the same numberof bits along each dimension. The maximum size for a scan is100x100; for a tumor it is 8×8. The minimum size for each is2x2.

Output

The output consists of a list of the possible tumors detectedwithin the scan. For each tumor, you are to indicate the locationof its anchor point (upper left corner) and the number of degrees(0, 90, 180, 270) that the input tumor was rotatedcounter-clockwise to determine the match. This data is to beformatted as in the first two examples, but the list may appear inany order in the case of more than one possible tumor. In the eventthat no tumor is found, the message from the third example is to beprinted.

Sample Input 1 0000110011 1110101001 0010000000 0000000111 1100000100 0101001111 0011 0010 0111 0011 Sample Output 1 PossibleSample Inpuf 3 000010 100000 000010 010 011 010 Sample Output 3

Possible Tumor Patient Scan Sample Input 1 0000110011 1110101001 0010000000 0000000111 1100000100 0101001111 0011 0010 0111 0011 Sample Output 1 Possible tumor at (3, 5, 0) Sample Input 2 000010 000011 111010 010000 010 011 010 Sample Output 2 Possible tumor at (0, 3, 0) Possible tumor at (1, 0, 270) Sample Inpuf 3 000010 100000 000010 010 011 010 Sample Output 3 Show transcribed image text Possible Tumor Patient Scan
Sample Input 1 0000110011 1110101001 0010000000 0000000111 1100000100 0101001111 0011 0010 0111 0011 Sample Output 1 Possible tumor at (3, 5, 0) Sample Input 2 000010 000011 111010 010000 010 011 010 Sample Output 2 Possible tumor at (0, 3, 0) Possible tumor at (1, 0, 270)
Sample Inpuf 3 000010 100000 000010 010 011 010 Sample Output 3

Expert Answer


Answer to In Java – using recursion if possible: Tumor Detection One of the challenges of medical diagnosis is that of spotting an… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *