MCPcopy Create free account
hub / github.com/Kitware/VTK / Process

Method Process

IO/Image/vtkTIFFReader.cxx:600–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598// templated to handle different data types.
599template <class OT>
600void vtkTIFFReader::Process(OT* outPtr, int outExtent[6], vtkIdType outIncr[3])
601{
602 // multiple number of pages
603 if (this->InternalImage->NumberOfPages > 1)
604 {
605 this->ReadVolume(outPtr);
606 // close the TIFF file
607 this->InternalImage->Clean();
608 return;
609 }
610
611 // tiled image
612 if (this->InternalImage->NumberOfTiles > 0)
613 {
614 this->ReadTiles(outPtr);
615 // close the TIFF file
616 this->InternalImage->Clean();
617 return;
618 }
619
620 // The input tiff dataset is neither multiple pages and nor
621 // tiled. Hence close the image and start reading each TIFF
622 // file
623 this->InternalImage->Clean();
624
625 OT* outPtr2 = outPtr;
626 for (int idx2 = outExtent[4]; idx2 <= outExtent[5]; ++idx2)
627 {
628 this->ComputeInternalFileName(idx2);
629 // read in a TIFF file
630 this->Process2(outPtr2, outExtent);
631 // close the TIFF file
632 this->InternalImage->Clean();
633
634 this->UpdateProgress((idx2 - outExtent[4]) / (outExtent[5] - outExtent[4] + 1.0));
635 outPtr2 += outIncr[2];
636 }
637}
638
639//------------------------------------------------------------------------------
640// This function reads a data from a file. The datas extent/axes

Callers 1

Calls 6

ReadVolumeMethod · 0.95
ReadTilesMethod · 0.95
Process2Method · 0.95
CleanMethod · 0.45
UpdateProgressMethod · 0.45

Tested by

no test coverage detected