1 person found this helpful
1) Is there a way to do a color range selection created from all the colors that were selected from the magic wand tool. See attached image one.
I know no such method, but if you start selecting with the Magic Wand Tool with »Contiguous« unchecked in the Options Bar aren’t you there already?
2) Is there a way to crop an image based on histogram? For example if I wanted to remove all px that were above level 200 for all colors (or a specific color). Can effect the image at all from the histogram (without an side step to something like select color range)?
I may be misunderstanding you, but could you be using »crop« but meaning »clip«?
Could the Blend If-settings be employed for the task you have in mind?
see screenshot (it is set to 128, though)
1 person found this helpful
Let me reply first to your second question.
"2) Is there a way to crop an image based on histogram?"
As already mentioned by c.p, it appears you are using the term crop differently from conventional useage - you should look up its definition. That issue aside, the general answer is no. In Photoshop the data in a histogram are computed on the current state of the image as a result . Histogram data are not used as input to any opperation.
"1) Is there a way to do a color range selection created from all the colors that were selected from the magic wand tool."
If you meant can I use the selection (via the magic wand) as input to the color range command then the answer is no. If you meant, however, can I use that selection to find other areas with similar characteristics, then you can try clicking on Select > Similar. Starting from the selection you provided you can get the following result.
There are other ways to achieve similar results.
I suspect you will get more help by providing us with a description of exactly what you are trying to achieve rather than asking for help on the next step in a workflow that might be flawed from the outset. How, for example, do you want to quantify your regions of interest ? How specifically do you define your regions of interest ? What are the tolerances on defining the regions of interest? Is the analysis to be performed on this image or on hundreds of similar images. With more detailed input you may get an answers as to whether or not Photoshop is up to the task.
Right so clear region of interest ROI definition is the problem (and a problem my whole field wrestles with). There aren't good stains that clearly show what we're looking for vs background tissue, and their are slight but detectable difference in staining between slides. I'll try to clear things up.
First to clipping. Sorry I certainly did not mean crop as in the removal of the outer edge of a photo, but that I wanted to remove the outer edge of histogram data. I suspected that histograms were output only, but I wanted to confirm that.
I've been trying to remove all the near white background to transparent data, and remove all the data weighted at the high end of the spectrum on the histogram (Image 3). I think I understand a little more on how PS is scoring the transparent pixels. I had thought it would score an 0 on the alpha channel then ether delete or use 0 on RGB. Now I think PS puts alpha to 0 and retains the previous RGB scoring (Image 4). So deleting or clipping it all to transparent will not effect the histogram? When I originally asked the question I had tried blending, but didn't get the desired effect of removing the high end of the histogram. Sorry for not just asking that question. Do you have another thought how to exclude the high levels in exporting the histogram data?
Looking at Image 3, which is a zoomed out screen shot to show the whole image (29591x32342 px, a slice of mouse lung, on the small side for us) you might note there's not a lot of color variation. What we want to do is note all of the similarly selected items from airways image 2, as Paul suggested, from within the airways. Right now we have people painstakingly outlining each individual airway then collecting color data from the aggregates. I wanted to see if we could use PS to select ROI with a small enough background that we saw an effect (which is very significant from blinded manual scoring).
As to the question of how many we have, well the answer is thousands. We may or may not want to do them all, and the cost of man hours at the moment is irrelevant (speed is, however, an issue). Do you have any other thoughts on how we might better go about selecting our ROI, or getting out the data via export? I've also included a clean airway, image 5, a bloodvessel (a negative background problem), image 6, and a completely positive airway, image 7, for comparison.
Image 3 [Note there is no selection, and a counting error on the histogram.]
I have read your two postings several times now, but I still have more questions than answers. I also now have a slightly stronger feeling that you may be able to get some analysis done using Photoshop. Part of the problem is me not understanding some of the terminology you are using.
Lets start simply - with image 1 in your first posting:
In that image I see nearly white areas, I see dark burgundy areas (one of which you selected), I see dark purple areas and I see light purple areas of various tones. I see no transparent areas. I am guessing that this is an example of a starting image on which no modifications have been made. Now, which of these various colored areas are the regions of interest ? Physically what do each of the various colored areas represent?
Let's assume you are interested in the dark burgundy areas (since you selected one of those). What exactly do you want to quantify about all those areas ? Their total area ? their luminosity ? their total perimeter ? something else ? You indicated a strong interest in histogram data, but from that data what analysis on it will you do ?
You state "I wanted to see if we could use PS to select ROI with a small enough background that we saw an effect " I do not understand what "effect" you are looking for and as this seems central to your question I need a better definition to determine if Photoshop can help you. Similarly, I need to know what you mean by " blinded manual scoring"
What does "a completely positive airway" mean ?
Currently, my best understanding is that you are staining tissue and that areas that take the stain (various shades of burgundy) are the areas of interest, which are determined visually and somewhat imprecisely. The process for constructing the images introduces nearly white areas, which you want to eliminate from your analysis. Finally, and most importantly, you want some measure, as yet undefined, about the stained areas - maybe relative, maybe absolute.
I suspect that this is one of those situations in which understanding your problem is the biggest issue. Determining if Photoshop can be used and exactly how it might be used should probably go quickly.
Well, I must say my grip on the issue is not a lot tighter now …
Could you please, to make it real easy, post one sample image and all the intended resulting images/evaluations you need?