[Insight-users] How to create a sphere surface image mask with 26|6 connectivity?
lynx.abraxas at freenet.de
lynx.abraxas at freenet.de
Mon Feb 15 02:59:25 EST 2010
Hello again!
With Luis answer I remebered seing such thing some where in the vtk books.
Having had a longer look for that again I came up with all these for a
possible realization:
sphere/ellipsoid sources:
vtkSphere: impicit function
vtkSphereSource: a mesh of a sphere (theta, phi)
vtkImageEllipsoidSource: a filled sphere/ellipsoid image
Possible ways to create an image of a sphere surface:
- by "hand": vtk book p.152
- vtkSphere -> vtkSampleFunction -> threshold at 0 ?
- vtkImageEllipsoidSource - vtkImageEllipsoidSource (r1 < r2)
- vtkSphereSource -> vtkImplicitModeller or vtkVoxelModeller ?
So I now wonder what would be the best way to get exact 6|26 connectivity or
an anti-aliased result that is best for masking a reagion that would be just
the 2D spere surface if there wouldn't be the dicretisation.
Since I'm using itk and vtk for my project what would be better (running
quicker) for this task an itk or a vtk implementation?
Thanks for any help or hints
Lynx
On 13/02/10 12:53:27, lynx.abraxas at freenet.de wrote:
> Hello!
>
>
> I need a 3D mask of a sphere suface once with 26 connectivity, once with 6
> connectivity and once with aliasing (as a weighting mask).
> The mask should be a cube of size NxNxN where N is odd (corresponding to some
> definit physsical size) such that the centre pixel of the cube should be the
> centre of the sphere with a physical radius of 1.
>
> I was thinking of doing it with a for loop over all indices of the mask volume
> but there I don't know how to realize the none aliased cases. The aliasing I
> think could be done by assigning a grey value corresponding to the distance
> from the actual radius-point to the nearest voxel-centre. The grey value
> should be down at zero for a distance bigger than one voxel.
>
> Looking at the docs I found the ellipsoid spacial object but nothing about how
> to "render" that into a 3D image and again no clue how to differentiate the
> three "rendering cases".
>
> How could that be done with ITK or VTK?
> Is there a way to implement also a surface thickness bigger than 1 voxel?
>
> Many thanks for any help or hints.
> Lynx
> _______________________________________________
> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the Insight-users
mailing list