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

Method Open

IO/Image/vtkTIFFReader.cxx:147–174  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

145
146//------------------------------------------------------------------------------
147bool vtkTIFFReader::vtkTIFFReaderInternal::Open(const char* filename)
148{
149 this->Clean();
150 vtksys::SystemTools::Stat_t fs;
151 if (vtksys::SystemTools::Stat(filename, &fs))
152 {
153 return false;
154 }
155#if defined(_WIN32)
156 std::wstring widepath = vtksys::Encoding::ToWide(filename);
157 this->Image = TIFFOpenW(widepath.c_str(), "r");
158#else
159 this->Image = TIFFOpen(filename, "r");
160#endif
161 if (!this->Image)
162 {
163 this->Clean();
164 return false;
165 }
166 if (!this->Initialize())
167 {
168 this->Clean();
169 return false;
170 }
171
172 this->IsOpen = true;
173 return true;
174}
175
176//------------------------------------------------------------------------------
177void vtkTIFFReader::vtkTIFFReaderInternal::Clean()

Callers 15

HDRReaderUpdateSliceMethod · 0.45
ReadHeaderDataMethod · 0.45
ExecuteInformationMethod · 0.45
Process2Method · 0.45
CanReadFileMethod · 0.45
ExecuteInformationMethod · 0.45
ExecuteInformationMethod · 0.45
vtkBMPReaderUpdate2Function · 0.45
TestHDRReaderStreamFunction · 0.45

Calls 5

CleanMethod · 0.95
InitializeMethod · 0.95
TIFFOpenWFunction · 0.50
TIFFOpenFunction · 0.50
c_strMethod · 0.45

Tested by 8

TestHDRReaderStreamFunction · 0.36
TestBMPReaderStreamFunction · 0.36
TestGLTFImporterFunction · 0.36
TestOBJImporterStreamFunction · 0.36