[vtkusers] importing image data into VTK from textfile (mimics)

Bill Lorensen bill.lorensen at gmail.com
Mon Jan 25 17:00:46 EST 2010


Can you export the data into some sort of image format like DICOM?

On Mon, Jan 25, 2010 at 11:36 AM, michiel mentink
<michael.mentink at st-hughs.ox.ac.uk> wrote:
>
> I'd like to import image data into VTK from a textfile.
> The file is an exported segmented image, coming from MIMICS.
>
> The textfile has this data:
>
> 82.5000000000000    -119.687500000000    35.2119100000000    251
> 82.1875000000000    -119.375000000000    35.2119100000000    201
> 82.5000000000000    -119.375000000000    35.2119100000000    239
> 82.8125000000000    -119.375000000000    35.2119100000000    226
> 82.1875000000000    -119.062500000000    35.2119100000000    195
> 82.5000000000000    -119.062500000000    35.2119100000000    213
> 82.8125000000000    -119.062500000000    35.2119100000000    201
> 83.1250000000000    -119.062500000000    35.2119100000000    163
> 82.1875000000000    -118.750000000000    35.2119100000000    176
> 82.5000000000000    -118.750000000000    35.2119100000000    176
> 82.8125000000000    -118.750000000000    35.2119100000000    176
>
> with values for x, y, z and image intensity.
>
> How do I import this data into VTK?
>
> I guess I have to read everything into an array first, create an empty image
> and then copy the pixel values into that empty image?
> How do I set the inter pixel spacing and inter slice spacing?
>
> Kind regards,
>
> Michael
>
> _______________________________________________
> 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 vtkusers mailing list