[vtkusers] WG: vtkimagewriter

Michael Knopke Michael.Knopke at gmx.de
Tue Oct 2 06:31:33 EDT 2007


Hi Anne-Laure,
 
Sorry to answer so late, maybe you have solved your problem already.
I'm a bit confused of what you are trying to do. You write that you want to
visualize image_bin (which should be a volume) and in the other mail you
wrote that vtkImageWriter fails. So that are two different things. I'd
suggest trying to visualize either the volume (vtkFixedPointVolumeRenderer)
or a slice (vtkImageReslice) first, to see if your thresholding worked.
After that write it to disk, using vtkImageWriter. Or did I miss the point?
 
Michael
 
 
 
Original message:
 
Hi,
So, Sorry, I wasn't very precise. I send the code :
imge3Dvtk=vtkImageReader()
imge3Dvtk.SetFileDimensionality(3)
imge3Dvtk.SetFileName("myscan.raw")
 
imge3Dvtk.SetNumberOfScalarComponents(1) #scala de grises
imge3Dvtk.SetDataScalarTypeToShort() # 2 bytes por boxel
imge3Dvtk.SetDataExtent(0,511, 0, 511, 0, 62)
imge3Dvtk.GetDataExtent()
ExportToArray = vtkImageExportToArray()
ExportToArray.SetInput(imge3Dvtk.GetOutput ())
imagen = ExportToArray.GetArray()
 
 
# 1) Use a threshold to segment the background     
imagen_bin =(imagen<-200) 
 
And there, I'd like to visualize imagen_bin. 
I suppose that it's not too difficult but I didn't know the vtkImagewriter
syntax.
 
thank you very much,
 
Anne-Laure
 
 
 
 
 
Michael Knopke wrote:
> 
>  
> 
>  
> 
>   _____  
> 
> Von: knopkem.iis 
> Gesendet: Friday, September 28, 2007 11:33 AM
> An: 'vtkusers at vtk.org <http://www.vtk.org/mailman/listinfo/vtkusers> '
> Betreff: [vtkusers] vtkimagewriter
> 
>  
> 
> Hi,
> 
>  
> 
> can you provide more information about "mysegmentedimage"? What class, how
> did you create it, could you visualize it.
> Seems like the error could be rather found there not with vtkImageWriter.
> 
> Regards,
> 
> Michael
> 
> 
> _______________________________________________
> 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
> 
> 
 
-- 
View this message in context:
http://www.nabble.com/WG%3A-vtkimagewriter-tf4533377.html#a12938750
Sent from the VTK - Users mailing list archive at Nabble.com.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071002/216896f6/attachment.htm>


More information about the vtkusers mailing list