1
$\begingroup$

I have a 2D list which can be plotted as follows:

Image 1

enter image description here

Based on the plotted image, I would like to select some of the shapes on the image and extract the data for further analysis, for example,

Image 2:

enter image description here

Is there any interactive tool or function in Mathematica which can serve the purpose?

A sample data can be downloaded here: https://drive.google.com/file/d/1aY5Iq1eqhRuzJ2sQ7dtPZ3b5KONwhm58/view?usp=sharing

Many thanks in advance.

$\endgroup$
  • 1
    $\begingroup$ Do you want to filter original data based on that selection or to crop an image to that selection. Since images are usually rectangular, what do you expect to extract based on a round selection? $\endgroup$ – Kuba Aug 21 '19 at 7:31
  • 1
    $\begingroup$ this may be useful: howto- GetCoordinatesForPointsInAPlot $\endgroup$ – kglr Aug 21 '19 at 7:39
  • 1
    $\begingroup$ somewhat related: Exclude data from a list $\endgroup$ – kglr Aug 21 '19 at 7:42
  • 1
    $\begingroup$ If you click the image (within Mathematica), a toolbar will appear below. You can select a part of the image and create the corresponding mask using the "mask tool". $\endgroup$ – Szabolcs Aug 21 '19 at 8:26
  • 1
    $\begingroup$ I am guessing the pictures are obtained from input matrix using MatrixPlot. By "image" and "data" in "select some of the shapes on the image and extract the data " do you mean MatrixPlot[matrix] and the part of matrix corresponding to the marked shape or Image[MatrixPlot[matrix]] and ImageData for the selected part of Image[MatrixPlot[matrix]]? $\endgroup$ – kglr Aug 21 '19 at 10:26
2
$\begingroup$

Is there any interactive tool or function in Mathematica which can serve the purpose?

If you click the image (within Mathematica), a toolbar will appear below. You can select a part of the image and create the corresponding mask using the "mask tool".

enter image description here

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.