[vtkusers] Creating a 3D vtkStructuredPoints with a series of bmp images
anast.jm at pg.com
anast.jm at pg.com
Wed Nov 13 17:51:46 EST 2002
Thomas, try vtkImageLuminance instead of vtkImageExtractComponents (or do you
only want one color channel???) ......john
Internet Mail Message
Received from host: public.kitware.com
[24.97.130.19]
From: Thomas Deschamps <tdeschamps at lbl.gov>@public.kitware.com on 11/13/2002
02:28 PM PST
Thomas Deschamps <tdeschamps at lbl.gov> To: vtkusers at public.kitware.com
@public.kitware.com Cc: (bcc: John Anast-JM/PGI)
Subject: [vtkusers] Creating a 3D
vtkStructuredPoints with a series of bmp
Sent by: images
vtkusers-admin at public.kitware.com
11/13/2002 05:28 PM
Hi vtkUsers,
I have several bmp images which represent slices of the same volume.
I would like to create a vtkStructuredPoints with all these files, but
with the following code I obtain a 3D datasets of color data
------------------------------------------------------
vtkBMPReader reader
reader SetDataByteOrderToLittleEndian;
reader SetFileDimensionality 2;
reader SetNumberOfScalarComponents 1;
reader SetFilePrefix $filePrefix;
reader SetFilePattern $filePattern
reader SetFileNameSliceOffset 1
reader SetDataExtent 0 $xSize 0 $ySize 0 $zSize
reader SetDataSpacing $pixelWidth $pixelHeight $pixelDepth
reader Update
vtkImageExtractComponents extract
extract SetInput [reader GetOutput]
extract SetComponents 1
vtkImageToStructuredPoints i2sp
i2sp SetInput [extract GetOutput]
vtkStructuredPointsWriter writer
writer SetInput [i2sp GetOutput]
writer SetFileName $outputFileName
writer SetFileTypeToBinary
writer Update
------------------------------------------------------
I thaught maybe the vtkImageExtractComponents would b enough.
But at the end the header of my file contains
------------------------------------------------------
# vtk DataFile Version 3.0
vtk output
BINARY
DATASET STRUCTURED_POINTS
DIMENSIONS 326 211 30
SPACING 1 1 1
ORIGIN 0 0 0
CELL_DATA 1979250
POINT_DATA 2063580
COLOR_SCALARS scalars 1 <------------Pb
------------------------------------------------------
Does someone know how to handle that?
Thank you.
Thomas (TDeschamps at lbl.gov)
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <
http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list