[vtkusers] vtkStringArray problem

Cory Quammen cory.quammen at kitware.com
Wed Dec 3 07:14:14 EST 2014


Hi Rich,

Can you post the relevant section of code where you are setting up the
vtkStringArray and adding values?

Thanks,
Cory

On Wed, Dec 3, 2014 at 4:45 AM, mbcx9rb9 <richard.j.brown at live.co.uk> wrote:
> Hi all,
>
> I'm trying to put all DICOM files within a directory into a vtkStringArray
> so that I can check how many series there are. The problem, however, seems
> to be that InsertNexValue() and SetNumberOfValues() followed by SetValue()
> don't insert anything into the array. So, after a for loop of 160
> vtkStdStrings, GetNumberOfValues() returns 160, but each value is empty.
> Furthermore, GetValue() causes the program to crash. Any ideas?
>
> I need to use vtkStringArray (as opposed to a vector of std::string etc.),
> as this is the required argument for vtkDICOMSorter ( link
> <http://www.cognitive-antics.net/vtk-dicom/classvtk_d_i_c_o_m_sorter.html#ab855980b32de52e0363b35a16bfdf153>
> ).
>
> Any help greatly appreciated,
> Rich
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtkStringArray-problem-tp5729638.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers


More information about the vtkusers mailing list