[vtkusers] labelling iso-lines

Matheus Viana vianamp at gmail.com
Tue May 18 12:18:36 EDT 2010


How can I perform the distance transform over a large ImageData by using
vtkEclideanDistance?

I'm getting bad alloc error for imagedata larger than 370^3 pixels.

Here is my current code:

vtkImageData *DistanceTransform(vtkImageData *ImageData) {
        vtkImageEuclideanDistance *Transform =
vtkImageEuclideanDistance::New();
        Transform -> SetInput(ImageData);
        Transform -> ConsiderAnisotropyOff();
        Transform -> SetAlgorithmToSaitoCached();
        Transform -> InitializeOn();
        Transform -> Update();

        vtkImageData *DImageData = vtkImageData::New();
        DImageData -> DeepCopy(Transform -> GetOutput());
        DImageData -> SetScalarTypeToDouble();
        DImageData -> Update();

        Transform -> Delete();
        ImageData -> Delete();

        return DImageData;
}

Thanks,
Matheus Viana
Computational Physics
IFSC-USP


2010/5/18 rashedk <rashed.vtk at googlemail.com>

>
> Hi all,
>
> vtkContourFilter can draw contours on a dataset, however, is it possible to
> label/annotate these contours? I looked at vtkLabeledDataMapper but it only
> seems to label points, cells, etc.
>
> Rashed.
> --
> View this message in context:
> http://old.nabble.com/labelling-iso-lines-tp28597889p28597889.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100518/aaca13d1/attachment.htm>


More information about the vtkusers mailing list