View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001898VTK(No Category)public2005-05-31 16:442016-08-12 09:54
ReporterMathieu Malaterre 
Assigned ToWill Schroeder 
PrioritylowSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001898: vtkImageIterator / GetScalarRange does not play well
DescriptionThe following code does not work:

void FillImage(vtkImageData *im, int ext[6], int timestep)
{
  vtkImageIterator<signed char> it(im,ext);
  while (!it.IsAtEnd())
    {
    signed char* imSI = it.BeginSpan();
    signed char* imSIEnd = it.EndSpan();

    while (imSI != imSIEnd)
      {
      *imSI = (signed char)timestep;
      ++imSI;
      }
    it.NextSpan();
    }
  im->GetPointData()->Modified();
  im->Modified();
}


int main()
{
  vtkImageData *im = vtkImageData::New();
  int ext[6] = {0,10,0,10,0,10};
  im->SetExtent(ext);
  im->SetScalarType ( VTK_SIGNED_CHAR );

  FillImage(im, ext, 0);
  double *range = im->GetScalarRange();
  std::cerr << range[0] << "," << range[1] << std::endl;
  std::cout << "V=" << im->GetScalarComponentAsDouble ( 0, 0, 0, 0) << std::endl;


  FillImage(im, ext, 100);
  double *range = im->GetScalarRange();
  std::cerr << range[0] << "," << range[1] << std::endl;
  std::cout << "V=" << im->GetScalarComponentAsDouble ( 0, 0, 0, 0) << std::endl;
}
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0036789)
Kitware Robot (administrator)
2016-08-12 09:54

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:54 Kitware Robot Note Added: 0036789
2016-08-12 09:54 Kitware Robot Status expired => closed
2016-08-12 09:54 Kitware Robot Resolution open => moved


Copyright © 2000 - 2018 MantisBT Team