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

Program:   Medical Imaging & Interaction Toolkit
Module:    $RCSfile$
Language:  C++
Date:      $Date$
Version:   $Revision: $

Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html 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 notices for more information.

=========================================================================*/


#include "mitkUnstructuredGridVtkMapper3D.h"
#include "mitkDataTreeNode.h"
#include "mitkProperties.h"
#include "mitkTransferFunctionProperty.h"
#include "mitkColorProperty.h"
//#include "mitkLookupTableProperty.h"
#include "mitkMaterialProperty.h"
#include "mitkGridRepresentationProperty.h"
#include "mitkGridVolumeMapperProperty.h"
#include "mitkVtkInterpolationProperty.h"
#include "mitkVtkScalarModeProperty.h"

#include <vtkUnstructuredGrid.h>
#include <vtkVolume.h>
#include <vtkVolumeProperty.h>
#include <vtkProperty.h>



const mitk::UnstructuredGrid* mitk::UnstructuredGridVtkMapper3D::GetInput()
{
  return static_cast<const mitk::UnstructuredGrid * > ( GetData() );
}


mitk::UnstructuredGridVtkMapper3D::UnstructuredGridVtkMapper3D()
{
  
  m_VtkTriangleFilter = vtkDataSetTriangleFilter::New();
   
  m_Assembly = vtkAssembly::New();
  
  m_Volume = vtkVolume::New();
  m_Actor = vtkActor::New();
  
  m_VtkDataSetMapper = vtkDataSetMapper::New();
  m_Actor->SetMapper(m_VtkDataSetMapper);


  m_Assembly->AddPart(m_Actor);
  m_Assembly->AddPart(m_Volume);
  m_Prop3D = m_Assembly;

  //m_GenerateNormals = false;
}


mitk::UnstructuredGridVtkMapper3D::~UnstructuredGridVtkMapper3D()
{

  if (m_VtkTriangleFilter != 0)
    m_VtkTriangleFilter->Delete();   
<commit_msg>FIX: initialize variables properly<commit_after>/*=========================================================================

Program:   Medical Imaging & Interaction Toolkit
Module:    $RCSfile$
Language:  C++
Date:      $Date$
Version:   $Revision: $

Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html 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 notices for more information.

=========================================================================*/


#include "mitkUnstructuredGridVtkMapper3D.h"
#include "mitkDataTreeNode.h"
#include "mitkProperties.h"
#include "mitkTransferFunctionProperty.h"
#include "mitkColorProperty.h"
//#include "mitkLookupTableProperty.h"
#include "mitkMaterialProperty.h"
#include "mitkGridRepresentationProperty.h"
#include "mitkGridVolumeMapperProperty.h"
#include "mitkVtkInterpolationProperty.h"
#include "mitkVtkScalarModeProperty.h"

#include <vtkUnstructuredGrid.h>
#include <vtkVolume.h>
#include <vtkVolumeProperty.h>
#include <vtkProperty.h>



const mitk::UnstructuredGrid* mitk::UnstructuredGridVtkMapper3D::GetInput()
{
  return static_cast<const mitk::UnstructuredGrid * > ( GetData() );
}


mitk::UnstructuredGridVtkMapper3D::UnstructuredGridVtkMapper3D()
{
  
  m_VtkTriangleFilter = vtkDataSetTriangleFilter::New();
   
  m_Assembly = vtkAssembly::New();
  
  m_Volume = vtkVolume::New();
  m_Actor = vtkActor::New();
  
  m_VtkDataSetMapper = vtkDataSetMapper::New();
  m_Actor->SetMapper(m_VtkDataSetMapper);


  m_Assembly->AddPart(m_Actor);
  m_Assembly->AddPart(m_Volume);
  m_Prop3D = m_Assembly;
  
  m_VtkVolumeRayCastMapper = 0;
  #if (VTK_MAJOR_VERSION >= 5)
  m_VtkPTMapper = 0;
  m_VtkVolumeZSweepMapper = 0;
  #endif

  //m_GenerateNormals = false;
}


mitk::UnstructuredGridVtkMapper3D::~UnstructuredGridVtkMapper3D()
{

  if (m_VtkTriangleFilter != 0)
    m_VtkTriangleFilter->Delete();   

{'fraction_non_alphanumeric': 0.17172954434100932, 'fraction_numerical': 0.004899559039686428, 'mean_word_length': 6.519337016574585, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 22, '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': '3514996', 'n_tokens_mistral': 1336, 'n_tokens_neox': 1281, 'n_words': 259}