[Insight-users] Mesh to Grayscale Image

Bill Lorensen bill.lorensen at gmail.com
Mon Sep 28 08:19:51 EDT 2009


What platform are you using? What compiler? And is itk built optimized
(Release build type)?

Bill

On Sat, Sep 26, 2009 at 11:19 AM, Andreas Hahn <zweikaesehoch at gmx.de> wrote:
> Hi,
> I try to get a grayscale image from a triangular mesh. The final result
> shall be a dicom series which contains the surface consisting of values from
> the mesh point data.
> The approach with a TriangularMesh SpatialObject which is passed to the
> SpatialObjectToImageFilter is very slow. If i just tell the filter the
> spacing, it resutls in an empty volume with some 1.0 on the top. Setting
> origin slows it down by more then ten times but draws the mesh on the right
> place. And the resulting values are either 1.0 or 0.0 (input data between
> [0.5, 5.0]).
> Why is this filter so slow?
> Is it better in itk 3.16 (i'm still using 3.14)?
> I know the TriangularMeshToBinaryImageFilter works much faster but it's just
> binary and I need a surface.
> Is there a good workaround?
> Greets,
> Andreas
> Basic values:
> mesh contains 2356 points
> Number of Cells = 4704
> bounds = [-41.0628, 64.2066, -51.1757, 1.3605, -16.4932, 67.6209]
> Resulting Image:
> Image (0x117456400)
>   RTTI typeinfo:   itkEX::Image<float, 3u>
>   Reference Count: 3
>   Modified Time: 39880
>   Debug: Off
>   Observers:
>     none
>   Source: (0x117456260)
>   Source output index: 0
>   Release Data: Off
>   Data Released: False
>   Global Release Data: Off
>   PipelineMTime: 39710
>   UpdateMTime: 39881
>   LargestPossibleRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [21, 10, 16]
>   BufferedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [21, 10, 16]
>   RequestedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [21, 10, 16]
>   Spacing: [5, 5, 5]
>   Origin: [-41.0628, -51.1757, -16.4932]
>   Direction:
> 1 0 0
> 0 1 0
> 0 0 1
>   IndexToPointMatrix:
>   5 0 0
> 0 5 0
> 0 0 5
>   PointToIndexMatrix:
>   0.2 0 0
> 0 0.2 0
> 0 0 0.2
>   PixelContainer:
>     ImportImageContainer (0x103ed54e0)
>       RTTI typeinfo:   itkEX::ImportImageContainer<unsigned long, float>
>       Reference Count: 1
>       Modified Time: 39719
>       Debug: Off
>       Observers:
>         none
>       Pointer: 0x102134a00
>       Container manages memory: true
>       Size: 3360
>       Capacity: 3360
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list