<commit_before>/*=========================================================================

  Program: DICOM for VTK

  Copyright (c) 2012-2013 <NAME>
  All rights reserved.
  See Copyright.txt or http://www.cognitive-antics.net/bsd3.txt for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkDICOMReader - Read DICOM image files.
// .SECTION Description
// This class reads a series of DICOM files into a vtkImageData object,
// and also provides access to the DICOM meta data for each file.
// .SECTION Thanks
// This class was contributed to VTK by <NAME>.

#ifndef __vtkDICOMReader_h
#define __vtkDICOMReader_h

#include <vtkImageReader2.h>
#include "vtkDICOMModule.h"

class vtkIntArray;
class vtkTypeInt64Array;
class vtkStringArray;
class vtkMatrix4x4;
class vtkDICOMMetaData;
class vtkDICOMParser;

//----------------------------------------------------------------------------
class VTK_DICOM_EXPORT vtkDICOMReader : public vtkImageReader2
{
public:
  // Description:
  // Static method for construction.
  static vtkDICOMReader *New();
  vtkTypeMacro(vtkDICOMReader, vtkImageReader2);

  // Description:
  // Print information about this object.
  virtual void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Valid extensions for this file type.
  virtual const char* GetFileExtensions() {
    return ".dcm .dc"; }

  // Description:
  // Return a descriptive name that might be useful in a GUI.
  virtual const char* GetDescriptiveName() {
    return "DICOM"; }

  // Description:
  // Return true if this reader can read the given file.
  int CanReadFile(const char* filename);

  // Description:
  // Set the Stack ID of the stack to load, for named stacks.
  // If the series has multiple stacks, then by default the reader
  // will only load the first stack.  This method allows you to select
  // a different stack, if you know the DICOM StackID for the stack.
  void SetDesiredStackID(const char *stackId);
  const char *GetDesiredStackID() { return this->DesiredStackID; }

  // Description:
  // Get a list of the stacks the present in the input files.
  // A stack is a contiguous array of slices that form a volume.
  vtkStringArray *GetStackIDs() { return this->StackIDs; }

  // Description:
  // Get an array that converts slice index to input file index.
  // If the data has multiple scalar components, then this will
  // be a two-dimensional array and calling array->GetComponent(i,j)
  // will return the file index for slice i and scalar component j
  // for monochrome images, or for slice i and scalar component 3*j
  // for RGB images (or more precisely, at scalar component N*j where
  // N is the SamplesPerPixel value from the DICOM metadata).  If the
  // data has just one component, then use j=0. If you used SetFileNames()<commit_msg>Fix typo in header comment.<commit_after>/*=========================================================================

  Program: DICOM for VTK

  Copyright (c) 2012-2013 <NAME>
  All rights reserved.
  See Copyright.txt or http://www.cognitive-antics.net/bsd3.txt for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkDICOMReader - Read DICOM image files.
// .SECTION Description
// This class reads a series of DICOM files into a vtkImageData object,
// and also provides access to the DICOM meta data for each file.
// .SECTION Thanks
// This class was contributed to VTK by <NAME>.

#ifndef __vtkDICOMReader_h
#define __vtkDICOMReader_h

#include <vtkImageReader2.h>
#include "vtkDICOMModule.h"

class vtkIntArray;
class vtkTypeInt64Array;
class vtkStringArray;
class vtkMatrix4x4;
class vtkDICOMMetaData;
class vtkDICOMParser;

//----------------------------------------------------------------------------
class VTK_DICOM_EXPORT vtkDICOMReader : public vtkImageReader2
{
public:
  // Description:
  // Static method for construction.
  static vtkDICOMReader *New();
  vtkTypeMacro(vtkDICOMReader, vtkImageReader2);

  // Description:
  // Print information about this object.
  virtual void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Valid extensions for this file type.
  virtual const char* GetFileExtensions() {
    return ".dcm .dc"; }

  // Description:
  // Return a descriptive name that might be useful in a GUI.
  virtual const char* GetDescriptiveName() {
    return "DICOM"; }

  // Description:
  // Return true if this reader can read the given file.
  int CanReadFile(const char* filename);

  // Description:
  // Set the Stack ID of the stack to load, for named stacks.
  // If the series has multiple stacks, then by default the reader
  // will only load the first stack.  This method allows you to select
  // a different stack, if you know the DICOM StackID for the stack.
  void SetDesiredStackID(const char *stackId);
  const char *GetDesiredStackID() { return this->DesiredStackID; }

  // Description:
  // Get a list of the stacks that are present in the input files.
  // A stack is a contiguous array of slices that form a volume.
  vtkStringArray *GetStackIDs() { return this->StackIDs; }

  // Description:
  // Get an array that converts slice index to input file index.
  // If the data has multiple scalar components, then this will
  // be a two-dimensional array and calling array->GetComponent(i,j)
  // will return the file index for slice i and scalar component j
  // for monochrome images, or for slice i and scalar component 3*j
  // for RGB images (or more precisely, at scalar component N*j where
  // N is the SamplesPerPixel value from the DICOM metadata).  If the
  // data has just one component, then use j=0. If you used SetFileNames()
{'fraction_non_alphanumeric': 0.14458421826498938, 'fraction_numerical': 0.005881391929423297, 'mean_word_length': 3.302178496134926, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3465346', 'n_tokens_mistral': 1739, 'n_tokens_neox': 1652, 'n_words': 714}