[vtkusers] PNGWriter behaving strange

Bill Lorensen bill.lorensen at gmail.com
Sun Apr 25 12:35:36 EDT 2010


Replace
writer->Update()
with
writer->Write()

I'm not sure why the Update() does not work properly.

Bill

On Sun, Apr 25, 2010 at 11:02 AM, Christian Werner
<christian.werner at rwth-aachen.de> wrote:
> Hi!
>
> I have attached an extremely simple vtk-project. The output image is
> corrupted (has some size but cannot be viewed by no viewer whatsoever). The
> input image is fine and viewable. What could cause that? I believe it's just
> because I am a very bad user.
>
> Program output:
>
> reading input...
> Scalar Type: unsigned char
> Scalar Components: 1
> Dimensions: 2
>
> writing output file...
> done...
>
>
> Best regards,
> Christian
>
> #root CMakeLists.txt
> CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
> IF(COMMAND CMAKE_POLICY)
>  CMAKE_POLICY(SET CMP0003 NEW)
> ENDIF(COMMAND CMAKE_POLICY)
>
> # This project is designed to be built outside the Insight source tree.
> # Must be defined BEFORE everything else
> PROJECT(vtkFilterTest)
>
> # Find VTK
> FIND_PACKAGE(VTK REQUIRED)
> INCLUDE(${VTK_USE_FILE})
>
> #does all the standard necessary CMakeLists stuff for ITK/VTK usage
> #include ITK, VTK, and setup my pv-plugin directories ...
> INCLUDE("/home/christian/programming/pv-plugins/conf.cmake")
>
> ADD_EXECUTABLE(vtkFilterTest vtkFilterTest.cxx)
>
> TARGET_LINK_LIBRARIES(vtkFilterTest
>      vtkImaging vtkIO vtkCommon
> )
>
> _______________________________________________
> 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