[Insight-users] Visual Studio debugger visualizers for ITK

Dženan Zukić dzenanz at gmail.com
Mon Aug 15 06:09:49 EDT 2011


I created the article<http://www.itk.org/Wiki/ITK_Debug_Visualizers_for_Visual_Studio>
and
put a link to it here <http://www.itk.org/Wiki/ITK#Users>.

I went through the iterator's code and fixed the dereference formula, it is
*(m_Buffer+m_Offset).

Regards,
Dženan

2011/8/10 Dženan Zukić <dzenanz at gmail.com>

> Hi guys and Luis,
>
> Visual studio has support for custom visualization of user types in
> debugger (watch window and mouse hover)
> File C:\Program Files (x86)\Microsoft Visual Studio
> 10.0\Common7\Packages\Debugger\autoexp.dat controls how different
> datatypes are displayed. The file itself contains instructions on how
> to modify it.
>
> With VS2008 SP1 and newer you don't even have to modify that file, you
> can add environment variable _vcee_autoexp which points to your own
> file which will then be combined with the system one on the fly.
>
> Example visualizer for ImageRegion:
> itk::ImageRegion<*>{
>   children
>    (
>      #(
>          size: $c.m_Size,
>          index: $c.m_Index
>       )
>    )
>    preview
>    (
>      #(
>          "R", $c.m_Size
>       )
>    )
> }
>
> Two example screenshots are attached:
> image: watch window displaying itk::Image using enhanced view
> buffer: itk::Image with underlying buffer expanded (limited to first
> million elements)
>
> I have started building this file (attached), but it only contains
> support for image and the classes it contains. With distributed
> effort, everyone can contribute a visualizer for a class or two for
> everyone's benefit.
>
> Also in the file are included my attempt at visualizing iterators by
> previewing their current offset and the element pointed to, but I got
> the math wrong because I am not familiar with iterator internals. I
> would appreciate is someone could tell me the formula to get the
> current element, to replace my attempt:
>
> currentElement: m_Buffer[m_BeginOffset+m_SpanBeginOffset+m_Offset]
>
> Some of this could probably be automated by changing the source code
> of the library, but that might even be more effort than doing this by
> hand for the most important classes.
>
> Also, we should probably put this file into the wiki. Is
> http://www.itk.org/Wiki/ITK the right place to put the link?
>
> Regards,
> Dženan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110815/71ce567f/attachment.htm>


More information about the Insight-users mailing list