-
-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added natvis file for Image Watch for eos::core::Image
Since our revamped Image class stores the data in row-major order, it now works perfectly with Image Watch, out-of-the-box. N-channel images and all data types work and are visualised correctly. This file has to be put somewhere where Visual Studio can find it, for example into C:\Users\Username\Documents\Visual Studio 2017\Visualizers.
- Loading branch information
1 parent
98946bf
commit be436f4
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | ||
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" MenuName="Add to Image Watch"/> | ||
|
||
<Type Name="eos::core::Image<*>"> | ||
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" /> | ||
</Type> | ||
<Type Name="eos::core::Image<eos::core::Pixel<*,*>>"> | ||
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" /> | ||
</Type> | ||
|
||
<!-- Images instantiated with a built-in type as PixelType (1-channel): --> | ||
<Type Name="eos::core::Image<*>"> | ||
<Expand> | ||
<Synthetic Name="[type]" Condition='strcmp("unsigned char", "$T1") == 0'> | ||
<DisplayString>UINT8</DisplayString> | ||
</Synthetic> | ||
<Synthetic Name="[type]" Condition='strcmp("int", "$T1") == 0'> | ||
<DisplayString>INT32</DisplayString> | ||
</Synthetic> | ||
<Synthetic Name="[type]" Condition='strcmp("float", "$T1") == 0'> | ||
<DisplayString>FLOAT32</DisplayString> | ||
</Synthetic> | ||
<Synthetic Name="[type]" Condition='strcmp("double", "$T1") == 0'> | ||
<DisplayString>FLOAT64</DisplayString> | ||
</Synthetic> | ||
|
||
<Synthetic Name="[channels]"> | ||
<DisplayString>1</DisplayString> | ||
</Synthetic> | ||
|
||
<Item Name="[width]">width_</Item> | ||
<Item Name="[height]">height_</Item> | ||
|
||
<Item Name="[data]">($T1*)(&data_[0])</Item> | ||
|
||
<Item Name="[stride]">row_stride</Item> | ||
</Expand> | ||
</Type> | ||
|
||
<!-- Images instantiated with Pixel<ElementType, NumChannels>: --> | ||
<Type Name="eos::core::Image<eos::core::Pixel<*,*>>"> | ||
<Expand> | ||
<Synthetic Name="[type]" Condition='strcmp("unsigned char", "$T1") == 0'> | ||
<DisplayString>UINT8</DisplayString> | ||
</Synthetic> | ||
<Synthetic Name="[type]" Condition='strcmp("int", "$T1") == 0'> | ||
<DisplayString>INT32</DisplayString> | ||
</Synthetic> | ||
<Synthetic Name="[type]" Condition='strcmp("float", "$T1") == 0'> | ||
<DisplayString>FLOAT32</DisplayString> | ||
</Synthetic> | ||
<Synthetic Name="[type]" Condition='strcmp("double", "$T1") == 0'> | ||
<DisplayString>FLOAT64</DisplayString> | ||
</Synthetic> | ||
|
||
<Item Name="[channels]">$T2</Item> | ||
|
||
<Item Name="[width]">width_</Item> | ||
<Item Name="[height]">height_</Item> | ||
|
||
<Item Name="[data]">($T1*)(&data_[0])</Item> | ||
|
||
<Item Name="[stride]">row_stride</Item> | ||
</Expand> | ||
</Type> | ||
</AutoVisualizer> |