Commit Graph

40 Commits

Author SHA1 Message Date
David C. Lonie
4807b3c472 Silence warnings about unavoidable weak vtables.
- Exception classes cannot be exported due to MSVC's design decisions.
  See http://stackoverflow.com/questions/24511376. We must leave these
  classes as header only and silence the warnings.
- TransferResource in BufferState.h must remain a header-only class since
  there is no vtkm_interop library to compile the class into.
- The VTKDataSetReader hierarchy must similarly remain header-only since
  there is no vtkm_io library.
- The OptionParser Action classes are part of a header-only utility and
  cannot be easily compiled into a library.
-
2017-04-13 14:06:33 -04:00
Sujin Philip
07cb111904 Fix more issues with the readers
1) Fix parsing issues related to visit style field data
2) Create appropriate dimension cellset for structured cell sets
2017-03-13 13:46:26 -04:00
Sujin Philip
6d6b599115 Support reading VTK files with empty title 2017-03-09 15:48:25 -05:00
Sujin Philip
a88807fd7e Catch all exceptions by reference 2017-02-23 13:25:01 -05:00
Kenneth Moreland
713cf4228a Make it not possible to create a cell set without specifying num points
The CellSetExplicit and CellSetSingleType classes have an ivar that
marks the number of points. There were several instances of code
creating cell sets without specifying the number of points. This can be
very bad if subsequent code needs that information.
2017-01-12 13:02:10 -07:00
Dave Pugmire
cef40f853e Fix compiler warnings. 2016-11-30 12:52:40 -05:00
Dave Pugmire
3046d45900 Fix some compiler warnings.
Add another rectilinear test.
2016-11-30 12:41:59 -05:00
Dave Pugmire
8383f21a81 Add VTK reader for rectilinear grids. 2016-11-30 10:39:32 -05:00
Matt Larsen
e15c858f8c Merge topic 'fix/dataset_reader'
4f482474 Fixing error in data set reader that zeroed out cell asscociated fields in unstructured data sets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !587
2016-10-21 12:35:18 -04:00
Robert Maynard
5ec273aade Remove all occurrences of boost::lexical_cast from vtk-m.
Replaced with the new std::stof/stoi functions.
2016-10-20 16:55:15 -04:00
Robert Maynard
37efba159c CellSetSingleType now can be constructed with proper number of points
This is important so that when we execute a Cell->Point worklet we
don't have to compute the number of points from the connectivity array.
2016-10-20 08:33:16 -04:00
Matt Larsen
4f482474e9 Fixing error in data set reader that zeroed out cell asscociated fields in unstructured data sets 2016-10-19 15:00:39 -07:00
Matt Larsen
69d4ced2ac Fixing typo 2016-09-21 14:14:27 -07:00
Matt Larsen
a564ca0f3e Casting size_t 2016-09-21 14:14:26 -07:00
Matt Larsen
0015e3150b Adding static cast to suppress warnings 2016-09-21 14:14:26 -07:00
Matt Larsen
d9bd4cb698 Adding else statement 2016-09-21 14:14:26 -07:00
Matt Larsen
f623400151 Adding support in the vtk data set reader for skipping strings in field data 2016-09-21 14:14:26 -07:00
Robert Maynard
c9834283ea Remove vtkm usage of boost::shared and scoped pointers.
Now we are using c++11 shared_ptr and unique_ptr
2016-09-01 09:38:25 -04:00
Robert Maynard
f81c42b9b4 Replace NULL with nullptr where applicable. 2016-09-01 09:38:25 -04:00
Robert Maynard
12810165bb Switch over to c++11 type_traits. 2016-08-31 16:11:26 -04:00
Robert Maynard
08a33675f6 Prefer vtkm::cont::CastAndCall function over the member method. 2016-08-05 15:29:39 -04:00
T.J. Corona
8ad8eeda77 In DynamicCellSet, expose CellSet API.
Also changes GetCellSet() to CastToBase().
2016-08-02 13:39:25 -04:00
Kenneth Moreland
eaa5747527 Fix conversion warning
This warning happened on GCC 4.8.0.
2016-06-09 11:00:06 -06:00
Kenneth Moreland
0d5885c0a9 Name fields only with their field name
The Legacy VTK file reader was augmenting all the field names with the
type of field. For example, if you had a point scalar field named
"elevation", it would be loaded as "SCALARS:elevation".

This is bad for two reasons. First, it is downright confusing. A tool
like ParaView or VisIt will tell me the field is named "elevation", but
VTK-m will report that field does not exist. Second, the writer does not
follow the same convention. Thus, if you have a loop of read file,
modify, write file, you could end up with fields named
"SCALARS:SCALARS:SCALARS:...".
2016-05-31 12:57:44 -06:00
Robert Maynard
265b778ab9 Fix unused warning in VTKDataSetReaderBase. 2016-03-31 14:37:50 -04:00
Jeremy Meredith
ba8517eb67 removing all references to field order. 2016-03-23 10:38:14 -04:00
Kenneth Moreland
e863ee991a Change interface of VTKDataSetWriter
Make it match VTKDataSetReader better. It's also a bit easier to use
because you just have to give it a filename rather than open your own file
stream.
2016-03-16 15:35:38 -06:00
Kenneth Moreland
0731bd4a53 Fix compiler error about difference_type
Whoops. Pointers are not classes and do not have a difference_type
member. You have to get that from iterator_traits. I'm not sure why this
succeeded on MSVC, but it was clearly wrong.
2016-01-26 17:09:10 -07:00
Kenneth Moreland
cadf0e53ab Fix MSVC warnings
Fix your typical batch of MSVC warnings including picky type conversions
and using "unsafe" std functions on pointers for iterators.
2016-01-26 16:23:00 -07:00
Kenneth Moreland
feaed27cb0 Fixes related to changes in how the Dynamic class do casting
A recently merged topic branch changed the methods of how the Dynamic
classes do casting and type checking. The
support_visit_structured_points topic branch was started before these
changes and merged to master afterward. It used an old version of IsType
that did not conflict and caused a compile error. This fixes the compile
error.
2016-01-21 15:27:25 -07:00
Robert Maynard
27c25bd72f Merge topic 'support_visit_structured_points'
c8c0556d Fixed issues that Sujin found during code review.
33b20a8d All readers now support Fields before data (aka VisIt files).
10d59c17 StructuredPointsReader supports multiple visit fields.
735462f8 Update the io readers to handle visit style structured points files.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !313
2016-01-21 13:41:02 -05:00
Robert Maynard
c8c0556dbb Fixed issues that Sujin found during code review. 2016-01-21 12:44:14 -05:00
Robert Maynard
33b20a8d18 All readers now support Fields before data (aka VisIt files). 2016-01-20 15:58:41 -05:00
Kenneth Moreland
ed43dad6ca Simplify and unify cast interface.
Previously, DynamicArrayHandle and DynamicCellSet had slightly different
interfaces to their CastTo feature. It was a bit confusing and not all
that easy to use.

This change simplifies and unifies them by making each class have a single
CopyTo method that takes a reference to a cast object (an ArrayHandle or
CellSet, respectively) and fills that object with the data contained if
the cast is successfull. This interface gets around having to declare
strange types.

Each object also has a Cast method that has to have a template parameter
specified and returns a reference of that type (if possible).

In addition, the old behavior is preserved for DynamicArrayHandle (but
not DynamicCellSet). To avoid confusion, the name of that cast method is
CastToTypeStorage. However, the method was chaned to not take parameters
to make it consistent with the other Cast method.

Also, the IsType methods have been modified to reflect changes in
cast/copy. IsType now no longer takes arguments. However, an alternate
IsSameType does the same thing but does take an argument.
2016-01-18 15:58:04 -07:00
Robert Maynard
10d59c176b StructuredPointsReader supports multiple visit fields. 2016-01-14 13:10:24 -05:00
Robert Maynard
735462f891 Update the io readers to handle visit style structured points files. 2016-01-14 10:13:24 -05:00
Sujin Philip
066e1bf3b1 Convert unsupported cell types to supported types 2015-11-24 13:56:23 -05:00
Sujin Philip
c6a562aeba Fix for MSVC conversion warning 2015-11-12 10:29:30 -05:00
Sujin Philip
503f9197fd Fix VTK DataSet IO to work correctly with DynamicArrayHandle 2015-11-12 10:28:22 -05:00
Sujin Philip
cf372c7014 Add legacy VTK file readers 2015-11-04 14:23:16 -05:00