Mimicking IQ+IPF plot from EDAX OIM?

99 views
Skip to first unread message

MTEXNewbie

unread,
Dec 14, 2018, 7:04:34 AM12/14/18
to MTEX
Hi All,

The goal is to mimic the combined IQ (grayscale) + IPF (colored) plot obtained from EDAX OIM software.

I guess outputting the IPF color RGB values multiplied, by MAD (in the case of Oxford) or by CI (in the case of OIM-TSL), would do the trick?

If yes, then how to perform the multiplication on a pixel by pixel basis (not a matrix multiplication)?


Thank you.

ruediger Kilian

unread,
Dec 14, 2018, 7:28:09 AM12/14/18
to mtex...@googlegroups.com
Hi,
maybe that could be a start for you:

mtexdata twins
plot(ebsd,ebsd.prop.bc)
hold on
mtexColorMap black2white
om = ipfHKLKey(ebsd('m').CS)
col = om.orientation2color(ebsd('m').orientations);
plot(ebsd('m'),col,'FaceAlpha',0.3)
hold off


Cheers,
Rüdiger

MTEXNewbie

unread,
Dec 14, 2018, 7:50:22 AM12/14/18
to MTEX
Hi Rudiger,

Thank you for the snippet.

Does it mean my guess of multiplication by MAD or CI is incorrect, and I have to consider Band Contrast instead?

ruediger Kilian

unread,
Dec 14, 2018, 7:56:16 AM12/14/18
to mtex...@googlegroups.com
Hi,
actually, I did not care about that part and of course you can use whatever property you like. It was rather an example of how to set a colormap and plot something semi-transparently on top, defined by an RDB vector.

Cheers,Rüdiger

MTEXNewbie

unread,
Dec 16, 2018, 7:22:43 AM12/16/18
to MTEX
Hi Rudiger,

After playing with different parameters, Band Contrast is the property I need. So the above code is indeed a good example. However, the use of transparency is making things difficult to discern.

Instead, only plotting the IPF map after multiplying the color RGB values of each pixel by the corresponding band contrast pixel value (on a scale of 0 to 100%) would be useful.

Is such a thing doable?


Rüdiger Kilian

unread,
Dec 16, 2018, 7:35:55 AM12/16/18
to mtex...@googlegroups.com
Hi,
there's almost nothing you can't do. Why don't you just try it out? Should be a good exercise.
Note, that final RGB values should be within the range of 0,1, so you probably need to think a little bit about how you'd do it.
Cheers,
Rüdiger

MTEXNewbie

unread,
Jan 27, 2019, 8:28:23 AM1/27/19
to MTEX
Hi Rüdiger,

I was wondering if we can add Band Contrast (BC) image later over the IPF map? I have changed the order of your code above, but only BC image is shown.

mtexdata twins 
om = ipfHKLKey(ebsd('m').CS) 
col = om.orientation2color(ebsd('m').orientations); 
plot(ebsd('m'),col,'FaceAlpha',0.3) 
hold on 
plot(ebsd,ebsd.prop.bc) 
mtexColorMap black2white 
hold off 


ruediger Kilian

unread,
Jan 27, 2019, 11:44:04 AM1/27/19
to mtex...@googlegroups.com
Hi,
'FaceAlpha',0.3 is what determines the transparency, so you should supply this to the second plot, not the first and it should be ok.

Cheers,
Rüdiger

MTEXNewbie

unread,
Jan 28, 2019, 7:35:02 AM1/28/19
to mtex...@googlegroups.com
Hi Rüdiger,

Thanks for the tip. Turns out, your initial code is better.

There are some regions where BC map has materials but IPF map is nil - [image removed]

I would like to remove those BC points and fill the areas in the map that are not being occupied by IPF by white color. Is there is a method available in MTEX that will tell me if a point has IPF or Orientation data (e.g. isIPF, isOrientation etc.)?

ruediger Kilian

unread,
Jan 28, 2019, 8:09:57 AM1/28/19
to mtex...@googlegroups.com
Hi,

how about ebsd('phase_name_used_for_the_pf_plot').prop.bc ?

Cheers,
Rüdiger

MTEXNewbie

unread,
Jan 28, 2019, 8:42:04 AM1/28/19
to MTEX
Perfect!

Thanks a lot, this simple solution did not come to my mind. My initial plan of multiplying the IPF pixels (RGB) by BC pixel values resulted in a rather complicated solution.
Reply all
Reply to author
Forward
0 new messages