[vtkusers] File formats in Medical.cxx ??How to read a volume set of png files?

syssboxx-vtk at yahoo.fr syssboxx-vtk at yahoo.fr
Fri Jun 3 07:14:15 EDT 2005


Hi,
There is the algorithme that i use(abstract):
 
 - itkSeriesReader - read png files like ln001.png ln002.png ...
 - itkDilateFilter
 - itkErodeFilter
 - itkOtsuThresholdFilter
 - method that saves only boundaries of the object in the image - contour of black pixels at white background - (contour image like jointed - cont004.png)
it think there's somthing easier and more efficient for this purpose in itk but i didn't find
 - itkWriter - I save a volume with the contours of images - contour.mhd
 
I thinked first I can visualise this volume.mhd in vtk,it's my purpose but it visualize only the first slice in the volume
 - so I extracted x,y,z coordinates of pixels on the contour in txt
 - I read .txt and put x,y,z in vtkPolyData
 - vtkSurfaceReconstructionFilter
 - vtkContourFilter
 - vtkSmoothPolyDataFilter 
 - vtkPolyDataNormals
 - vtkPolyDataMapper
 - vtkActor
 - vtkRenderer
 - vtkRenderWindow 
 
I want to get something like in Medical.cxx.
I saw that vtkVolumeReader can read images files to compose a volume so may be it's better to use it instead of vtkBMPReader,it works the same way.But when I initialise an instance 
 
vtkVolumeReader *volumer=vtkVolumeReader::New(); I get error msg:
 
errorC2440 - impossible de convertir vtkObject en vtkVolumeReader 
 but with vtkVolume16Reader there's no problem.
  
So I want to make a surface and a volume from this contour.mhd , is marchingcubes better approch then surfaceRectonstructionFilter??Can i implement a surface with my points following Medical exemples??
Regards,
Stanislava

med ali <daalyusmo at yahoo.fr> a écrit :
hi,
 
can you give me the code you have developped 
 
you can use this to construct a volume from *.bmp slices 
 
  reader= vtkBMPReader()
  
  I am not fimiliar with the BMPReader, But i think it is as same as 
the vtkImageReader. you can read the bmp as follows: 
reader=vtkBMPReader()
reader.SetFilePrefix(.../file) # make sure your all 2D images with the 
same file head, such as file.1, file.2,....
reader.SetDataByteOrderToLittleEndian()
reader.SetDataExtent(0, 180, 0, 216, 0, 180)
reader.SetDataSpacing(0.312012, -0.33603, 0.33603)
marchingcubes= vtkImageMarchingCubes()
marchingcubes.SetInput(reader.GetOutput())
marchingcubes.SetValue(0,800)
writer=vtkPolyDataWriter()
writer.SetInput(marchingcube.GetOutput()) 
writer.SetFileName(".../heart.pdw");
writer.Write()
 
 
 
Best Regards!
 
dali 

syssboxx-vtk at yahoo.fr a écrit :
Hi to all,
I have a question about the exemples Medical.cxx. It use the files in the directory Data\headsq\quarter to read a volume dataset and create an isosurface of the skin.In fact what represent these quarter... files and what information have it,is it something like a dicom file?How is it obtained,is it like a CT scan where it's much easy to separate the structure of the bone and the skin.
Is it possible to read a volume set of 2d .png images from MRI scan and if yes,what kind of volume reader can i use.What is the best way to read a volume of png with MRI and process them to compose a volume and visualise it in vtk.That I'm doing is reading the png series in ITK and then processing then - morphological operations, thresholding and I developped my method for detect the contour exterior so in end of my itk pipeline i have a volume which contains a files with only a contour of width one pixel.I exported my coordinates x,y,z of this pixels in a txt file and i visualize it with vtk with surfaceReconstructionFilter and ContourFilter but the results aren't very nice.
It's the problem that my images have only a thin contour or I have to fill them before use surfaceRecenostructionFilter.
Is there a other way to visualise my set of point without fill the interior?
 
Thanks a lot,
Stanislava IVANOVA



---------------------------------
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos !
Créez votre Yahoo! Mail _______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici ! 



---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici ! 



		
---------------------------------
 Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
 Téléchargez le ici ! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050603/cd3263af/attachment.htm>


More information about the vtkusers mailing list