<commit_before>#pragma once

#include "GLBlaat/GLTexture3D.h"

#include "Math/Vector3.h"

#include <QObject>

#include <vtkImageData.h>
#include <vtkImageShiftScale.h>
#include <vtkSmartPointer.h>

#include <algorithm>

namespace NQVTK
{
	class ImageDataTexture3D : public GLTexture3D
	{
	public:
		typedef GLTexture3D Superclass;

		static ImageDataTexture3D *New(vtkImageData *data)
		{
			if (!data) return 0;

			qDebug("Converting imagedata...");

			// Get the scalar range of the image
			double range[2];
			data->GetScalarRange(range);
			qDebug("Range before conversion: %g..%g", range[0], range[1]);
			// Filter out border values
			// TODO: use a better way than hardcoding a maximum here
			range[0] = std::max(-255.0, range[0]);
			range[1] = std::min(255.0, range[1]);

			double shift = range[0];<commit_msg>Removed data range clipping, as this is now handled by the preprocessor script.<commit_after>#pragma once

#include "GLBlaat/GLTexture3D.h"

#include "Math/Vector3.h"

#include <QObject>

#include <vtkImageData.h>
#include <vtkImageShiftScale.h>
#include <vtkSmartPointer.h>

#include <algorithm>

namespace NQVTK
{
	class ImageDataTexture3D : public GLTexture3D
	{
	public:
		typedef GLTexture3D Superclass;

		static ImageDataTexture3D *New(vtkImageData *data)
		{
			if (!data) return 0;

			qDebug("Converting imagedata...");

			// Get the scalar range of the image
			double range[2];
			data->GetScalarRange(range);
			qDebug("Range before conversion: %g..%g", range[0], range[1]);

			double shift = range[0];
{'fraction_non_alphanumeric': 0.1297016861219196, 'fraction_numerical': 0.02204928664072633, 'mean_word_length': 4.376306620209059, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5540590', 'n_tokens_mistral': 604, 'n_tokens_neox': 536, 'n_words': 141}