GetValue function in vtkStringArray always return NULL
I want to make a vtkStringArray object for passing the Dicom filenames to the vtkDicomSorter.
vtkSmartPointer<vtkStringArray> filenames =
vtkSmartPointer<vtkStringArray>::New();
filenames->SetName("Array1");
filenames->InsertNextValue("Text1");
filenames->InsertNextValue("Text2");
filenames->InsertNextValue("Text3");
filenames->InsertNextValue("Text4");
const std::string& fileName = filenames->GetValue(0);
vtkSmartPointer <vtkDICOMFileSorter> sorter = vtkSmartPointer<vtkDICOMFileSorter>::New();
sorter->SetInputFileNames(filenames);
sorter->Update();
but always the filename variable points to NULL and the sorter cannot work with this array and always Update function has an error. I tested this on the several projects and the filename was right only when I run it in Vtk example project. I try to run this code in vc++ x64 with debug config.
where could be a problem?