MantisBT - VTK | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0001898 | VTK | (No Category) | public | 2005-05-31 16:44 | 2016-08-12 09:54 |
| Reporter | Mathieu Malaterre | ||||
| Assigned To | Will Schroeder | ||||
| Priority | low | Severity | major | Reproducibility | always |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Project | |||||
| Type | |||||
| Summary | 0001898: vtkImageIterator / GetScalarRange does not play well | ||||
| Description | The 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; } | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| 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 | ||
| Notes | |||||
|
|
|||||
|
|
||||