[vtk-developers] vtkImageReader2

Bill Lorensen bill.lorensen at gmail.com
Fri Sep 23 16:27:55 EDT 2011


The headsq/quarter dataset has no header. It's raw. I believe
ImageReader2 can be used to read data without headers. It should not
be made abstract.

On Fri, Sep 23, 2011 at 12:03 PM, David Doria <daviddoria at gmail.com> wrote:
>> Sure, I just wanted to make sure that that is the right thing to do -
>> i.e. that there is no practical use of the abstract class on its own.
>>
>> David
>>
>
> There seem to be many places in VTK tests where vtkImageReader2 is
> used to read the headsq/quarter dataset. It seems to be .nhdr format.
> Is there not a better way to read this data set?
>
> Can code like this:
>
>  vtkSmartPointer<vtkImageReader2> reader =
>    vtkSmartPointer<vtkImageReader2>::New();
>  reader->SetFilePrefix(argv[1]);
>  reader->SetDataExtent(0, 63, 0, 63, 1, 93);
>  reader->SetDataSpacing(3.2, 3.2, 1.5);
>  reader->SetDataOrigin(0.0, 0.0, 0.0);
>  reader->SetDataScalarTypeToUnsignedShort();
>  reader->SetDataByteOrderToLittleEndian();
>  reader->UpdateWholeExtent();
>
> be extracted from a header instead by one of the subclasses?
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list