09-22-2017 01:45 AM
Simple solution is forget class names and colors and play just with pixel values. I mean simple equations like this:
EITHER 1 IF ( $Input1==1 OR $Input1==2 ) OR 0 OTHERWISE
That changes all pixels with value 1 or 2 to 1 and everything else goes to zero. I use Spatial Modeller very often in recodes and I always do it in this way. The key thing is that you decide that certain pixel values always means something. When this recoding is done with standard pixel values then in the end adding colors is very easy via copy-paste tables or even automatically using Spatial Modeller.
Of course you can do word detections from attributes and a lot of other fancy things in Spatial Modeller but then things go way more complex than trusting just pixel values and defining what certain pixel value means. Do not make first round too complex to you but try to find simple quick and dirty solutiion and when that works in a way you want start tuning it up to more fancy things.
I never use Imagine own Recode - I always do it in Spatial Modeller in way described above. Controlling things is so easy there that it is easier to me make a model than start using Imagine GUI for this task.
09-25-2017 01:11 AM
Attached simple model for binary recode. Everything that is above one will be 1 and rest goes to zero. This is made in old Imagine style and new modeller offers more flexible ways but for me this is the typical and easy way to control recoding.
Try to learn to write just normal text. Reading reply from attached images is bit clumsy :-)