Re: [Paraview] Converting an image from float to unsigned char

2010-12-11 Thread Jérôme
Hi David,
Data type casting is very application dependent. Adding a
casting-capability to a data writer could be an idea, but it means
that you add some functionalities to an object that was not intended
to handle them. More risky: it means that you will write data that are
not those you put in the writer!

Integrate vtkImageCast in ParaView is an easy task (it is done in
Peavip), either through a compiled plugin or an XML.

My 2c
Jerome

2010/12/10 David Doria daviddo...@gmail.com:
 On Fri, Dec 10, 2010 at 1:39 PM, Sven Buijssen
 sven.buijs...@tu-dortmund.de wrote:
 Hi David,

 May I remind you of a thread you started last year? It shouldn't be too
 hard to adapt the python code presented in one of the answers to your
 current use case: http://markmail.org/message/x2qs2jn6ltaw5v6u

 Sven

 Thanks Sven. Every time I use a programmable filter I think I am
 missing a built in function.

 Could the PNGWriter be hooked up to a vtkImageCast easily?

 David
 ___
 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 ParaView Wiki at: 
 http://paraview.org/Wiki/ParaView

 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/mailman/listinfo/paraview

___
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] Converting an image from float to unsigned char

2010-12-10 Thread David Doria
I have a mhd image of floats that I am trying to write as a PNG. Of
course the writer complains that the only allowable inputs are
unsigned char images. Is there a way to convert image types inside
ParaView (I would want to scale the floats to be in the range [0,255]
before casting)?

Thanks,

David
___
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Converting an image from float to unsigned char

2010-12-10 Thread David Doria
On Fri, Dec 10, 2010 at 1:39 PM, Sven Buijssen
sven.buijs...@tu-dortmund.de wrote:
 Hi David,

 May I remind you of a thread you started last year? It shouldn't be too
 hard to adapt the python code presented in one of the answers to your
 current use case: http://markmail.org/message/x2qs2jn6ltaw5v6u

 Sven

Thanks Sven. Every time I use a programmable filter I think I am
missing a built in function.

Could the PNGWriter be hooked up to a vtkImageCast easily?

David
___
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Converting an image from float to unsigned char

2010-12-10 Thread Sven Buijssen
Hi David,

May I remind you of a thread you started last year? It shouldn't be too
hard to adapt the python code presented in one of the answers to your
current use case: http://markmail.org/message/x2qs2jn6ltaw5v6u

Sven


David Doria wrote, On 10.12.2010 18:25:
 I have a mhd image of floats that I am trying to write as a PNG. Of
 course the writer complains that the only allowable inputs are
 unsigned char images. Is there a way to convert image types inside
 ParaView (I would want to scale the floats to be in the range [0,255]
 before casting)?
 
 Thanks,
 
 David
 ___
 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 ParaView Wiki at: 
 http://paraview.org/Wiki/ParaView
 
 Follow this link to subscribe/unsubscribe:
 http://www.paraview.org/mailman/listinfo/paraview

___
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview