[vtkusers] VTK4.2 CD

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Oct 4 14:29:25 EDT 2004


Kate,

 > Are there any other known problems with the version of vtk on the cd?

No absolutely not. Why are you saying

'I am also having'
       ^^^^

What does it have to do with an installation problem ?

As a side note, I ran on my linux box this c++ code(*), the reading of a 
512x512x512 unsigned short image took less than 3s:

./bench  1.19s user 1.77s system 101% cpu 2.923 total

Using VTK compiled in *debug* mode with no optimization using gcc 3.3

HTH
Mathieu

(*)
#include "vtkImageNoiseSource.h"
#include "vtkImageReader2.h"
#include "vtkImageWriter.h"
#include "vtkImageData.h"
#include "vtkImageCast.h"

void gen()
{
   vtkImageNoiseSource *noise = vtkImageNoiseSource::New();
   noise->SetWholeExtent(0,511,0,511,0,511);
   noise->SetMinimum(0.0);
   noise->SetMaximum(1.0);
   noise->ReleaseDataFlagOff();
   noise->Update();

   noise->GetOutput()->Print( cout );

   vtkImageCast *cast = vtkImageCast::New();
   cast->SetInput( noise->GetOutput() );
   cast->SetOutputScalarTypeToUnsignedShort ();

   vtkImageWriter *writer = vtkImageWriter::New();
   //writer->SetInput( noise->GetOutput () );
   writer->SetInput( cast->GetOutput () );
   writer->SetFileDimensionality (3);
   writer->SetFileName( "bench.img" );
   writer->Write();

   noise->Delete();
   cast->Delete();
   writer->Delete();

}

int main()
{
   //gen();

   vtkImageReader2 *reader = vtkImageReader2::New();
   reader->SetDataExtent (0, 511, 0, 511, 0, 511 );
   reader->SetDataScalarTypeToUnsignedShort();
   reader->SetDataByteOrderToLittleEndian();
   reader->SetFileName( "bench.img" );
   reader->Update();

   reader->GetOutput()->Print ( cout );

   reader->Delete();

   return 0;
}



Kate Kerekes wrote:
> Are there any other known problems with the version of vtk on the cd?  I
> installed the binary version from the cd thinking that this would be the
> most stable version for windows.
> 
> I am also having problems with the vtkImageReader2 and the time it takes to
> read a file.  Would upgrading to the newest version of vtk fix this problem?
> 
> Thanks,
> Kate Kerekes
> 
> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
> Of Mathieu Malaterre
> Sent: Monday, October 04, 2004 9:21 AM
> To: Weiguang Guan
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] VTK4.2 CD
> 
> Weiguang,
> 
> 	This is a known problem in VTK 4.2.3 could you please update your
> VTK 
> version using the one from (latest VTK 4.2.x is 4.2.6):
> 
> http://vtk.org/get-software.php#release
> 
> This will fix your problem
> 
> Thanks
> Mathieu
> 
> 
> Weiguang Guan wrote:
> 
>>Hi,
>>
>>We bought vtk books (user guide and visualization toolkit) a few months
>>ago. Recently I was trying to install it on both linux and windows from
>>the CD that comes with the books. The version is 4.2. After cmake, the
>>generated Makefile doesn't include three classes (vtkPushImageFilterSample
>>vtkPushImageReader vtkPushPipeline) for libHybrid.a. Building it on 
>>windows has the same problem. Does anyone know how this could happen?
>>
>>Weiguang
>>
> 
> 
> 
> 
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
> 
> 






More information about the vtkusers mailing list