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

Method SetFileName

IO/Image/vtkImageReader2.cxx:156–183  ·  view source on GitHub ↗

------------------------------------------------------------------------------ This function sets the name of the file.

Source from the content-addressed store, hash-verified

154//------------------------------------------------------------------------------
155// This function sets the name of the file.
156void vtkImageReader2::SetFileName(const char* name)
157{
158 if (this->FileName && name && (!strcmp(this->FileName, name)))
159 {
160 return;
161 }
162 if (!name && !this->FileName)
163 {
164 return;
165 }
166 delete[] this->FileName;
167 this->FileName = nullptr;
168 if (name)
169 {
170 this->FileName = new char[strlen(name) + 1];
171 strcpy(this->FileName, name);
172
173 delete[] this->FilePrefix;
174 this->FilePrefix = nullptr;
175 if (this->FileNames)
176 {
177 this->FileNames->Delete();
178 this->FileNames = nullptr;
179 }
180 }
181
182 this->Modified();
183}
184
185//------------------------------------------------------------------------------
186// This function sets an array containing file names

Callers 15

~vtkJSONImageWriterMethod · 0.45
~vtkMRCReaderMethod · 0.45
TestDisplayFunction · 0.45
TestReadWriteReadFunction · 0.45
TestJPEGReader.pyFile · 0.45
TestMHD.pyFile · 0.45
dem.pyFile · 0.45
TestBMPReader.pyFile · 0.45
TestTIFFReader.pyFile · 0.45

Calls 2

DeleteMethod · 0.65
ModifiedMethod · 0.45

Tested by 15

TestDisplayFunction · 0.36
TestReadWriteReadFunction · 0.36
TestBMPReaderFunction · 0.36
TestMetaIOFunction · 0.36
TestTIFFReaderFunction · 0.36
TestDICOMImageReaderFunction · 0.36
TestWriteToUnicodeFileFunction · 0.36
TestHDRReaderFunction · 0.36
TestTIFFReaderMultipleFunction · 0.36
TestNrrdReaderFunction · 0.36
TestDisplayFunction · 0.36