Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN JAVA Problem 2 - Tumor Detection One of the challenges of medical diagnosis is that of spotting anomalies among the various images now available
IN JAVA
Problem 2 - 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 physician's 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 tumoi In this problem, you will be given one slice of a scan from a patient as a series of 1's and 0's. 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 Possible Tumor Patient Scan In this case, the 1's are shown in black and the O's 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 (problem2.txt The input will consist of two consecutive sequences of lines of text containing 0's and 1's 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. Problem 2 - 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 physician's 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 tumoi In this problem, you will be given one slice of a scan from a patient as a series of 1's and 0's. 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 Possible Tumor Patient Scan In this case, the 1's are shown in black and the O's 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 (problem2.txt The input will consist of two consecutive sequences of lines of text containing 0's and 1's 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 printedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started