75 #define TIF_NEWSUBFILETYPE 254
76 #define TIF_IMAGEWIDTH 256
77 #define TIF_IMAGELENGTH 257
78 #define TIF_BITSPERSAMPLE 258
79 #define TIF_COMPRESSION 259
80 #define TIF_PHOTOMETRICINTERPRETATION 262
81 #define TIF_STRIPOFFSETS 273
82 #define TIF_SAMPLESPERPIXEL 277
83 #define TIF_STRIPBYTECOUNTS 279
84 #define TIF_PLANARCONFIGURATION 284
85 #define TIF_PREDICTOR 317
86 #define TIF_COLORMAP 320
87 #define TIF_CZ_LSMINFO 34412
89 #define SUBBLOCK_END 0x0FFFFFFFF
90 #define SUBBLOCK_RECORDING 0x010000000
91 #define SUBBLOCK_LASERS 0x030000000
92 #define SUBBLOCK_LASER 0x050000000
93 #define SUBBLOCK_TRACKS 0x020000000
94 #define SUBBLOCK_TRACK 0x040000000
95 #define SUBBLOCK_DETECTION_CHANNELS 0x060000000
96 #define SUBBLOCK_DETECTION_CHANNEL 0x070000000
97 #define SUBBLOCK_ILLUMINATION_CHANNELS 0x080000000
98 #define SUBBLOCK_ILLUMINATION_CHANNEL 0x090000000
99 #define SUBBLOCK_BEAM_SPLITTERS 0x0A0000000
100 #define SUBBLOCK_BEAM_SPLITTER 0x0B0000000
101 #define SUBBLOCK_DATA_CHANNELS 0x0C0000000
102 #define SUBBLOCK_DATA_CHANNEL 0x0D0000000
103 #define SUBBLOCK_TIMERS 0x011000000
104 #define SUBBLOCK_TIMER 0x012000000
105 #define SUBBLOCK_MARKERS 0x013000000
106 #define SUBBLOCK_MARKER 0x014000000
107 #define SUBBLOCK_END 0x0FFFFFFFF
109 #define RECORDING_ENTRY_NAME 0x010000001
110 #define RECORDING_ENTRY_DESCRIPTION 0x010000002
111 #define RECORDING_ENTRY_NOTES 0x010000003
112 #define RECORDING_ENTRY_OBJETIVE 0x010000004
113 #define RECORDING_ENTRY_PROCESSING_SUMMARY 0x010000005
114 #define RECORDING_ENTRY_SPECIAL_SCAN_MODE 0x010000006
115 #define RECORDING_ENTRY_SCAN_TYPE 0x010000007
116 #define OLEDB_RECORDING_ENTRY_SCAN_MODE 0x010000008
117 #define RECORDING_ENTRY_NUMBER_OF_STACKS 0x010000009
118 #define RECORDING_ENTRY_LINES_PER_PLANE 0x01000000A
119 #define RECORDING_ENTRY_SAMPLES_PER_LINE 0x01000000B
120 #define RECORDING_ENTRY_PLANES_PER_VOLUME 0x01000000C
121 #define RECORDING_ENTRY_IMAGES_WIDTH 0x01000000D
122 #define RECORDING_ENTRY_IMAGES_HEIGHT 0x01000000E
123 #define RECORDING_ENTRY_IMAGES_NUMBER_PLANES 0x01000000F
124 #define RECORDING_ENTRY_IMAGES_NUMBER_STACKS 0x010000010
125 #define RECORDING_ENTRY_IMAGES_NUMBER_CHANNELS 0x010000011
126 #define RECORDING_ENTRY_LINSCAN_XY_SIZE 0x010000012
127 #define RECORDING_ENTRY_SCAN_DIRECTION 0x010000013
128 #define RECORDING_ENTRY_TIME_SERIES 0x010000014
129 #define RECORDING_ENTRY_ORIGINAL_SCAN_DATA 0x010000015
130 #define RECORDING_ENTRY_ZOOM_X 0x010000016
131 #define RECORDING_ENTRY_ZOOM_Y 0x010000017
132 #define RECORDING_ENTRY_ZOOM_Z 0x010000018
133 #define RECORDING_ENTRY_SAMPLE_0X 0x010000019
134 #define RECORDING_ENTRY_SAMPLE_0Y 0x01000001A
135 #define RECORDING_ENTRY_SAMPLE_0Z 0x01000001B
136 #define RECORDING_ENTRY_SAMPLE_SPACING 0x01000001C
137 #define RECORDING_ENTRY_LINE_SPACING 0x01000001D
138 #define RECORDING_ENTRY_PLANE_SPACING 0x01000001E
139 #define RECORDING_ENTRY_PLANE_WIDTH 0x01000001F
140 #define RECORDING_ENTRY_PLANE_HEIGHT 0x010000020
141 #define RECORDING_ENTRY_VOLUME_DEPTH 0x010000021
142 #define RECORDING_ENTRY_ROTATION 0x010000034
143 #define RECORDING_ENTRY_NUTATION 0x010000023
144 #define RECORDING_ENTRY_PRECESSION 0x010000035
145 #define RECORDING_ENTRY_SAMPLE_0TIME 0x010000036
147 #define LASER_ENTRY_NAME 0x050000001
148 #define LASER_ENTRY_ACQUIRE 0x050000002
149 #define LASER_ENTRY_POWER 0x050000003
151 #define DETCHANNEL_ENTRY_DETECTOR_GAIN_FIRST 0x070000003
152 #define DETCHANNEL_ENTRY_DETECTOR_GAIN_LAST 0x070000004
153 #define DETCHANNEL_ENTRY_INTEGRATION_MODE 0x070000001
154 #define DETCHANNEL_ENTRY_ACQUIRE 0x07000000B
155 #define DETCHANNEL_DETECTION_CHANNEL_NAME 0x070000014
157 #define RECORDING_ENTRY_DESCRIPTION 0x010000002
159 #define ILLUMCHANNEL_ENTRY_WAVELENGTH 0x090000003
160 #define ILLUMCHANNEL_ENTRY_AQUIRE 0x090000004
161 #define ILLUMCHANNEL_DETCHANNEL_NAME 0x090000005
163 #define TRACK_ENTRY_ACQUIRE 0x040000006
164 #define TRACK_ENTRY_NAME 0x04000000C
165 #define TYPE_SUBBLOCK 0
167 #define TYPE_RATIONAL 5
183 #ifndef __vtkLSMReader_h
184 #define __vtkLSMReader_h
186 #include "vtkImageSource.h"
187 #include "vtkImageAlgorithm.h"
188 #include "vtkIntArray.h"
189 #include "vtkUnsignedIntArray.h"
190 #include "vtkUnsignedLongArray.h"
191 #include "vtkDoubleArray.h"
192 #include "vtkUnsignedShortArray.h"
193 #include "vtkUnsignedCharArray.h"
194 #include "vtkStringArray.h"
200 #define TIFF_RATIONAL 5
202 #define LSM_MAGIC_NUMBER 42
204 #define LSM_COMPRESSED 5
206 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
207 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
209 #include "vtkLSMConfigure.h"
218 virtual void PrintSelf(ostream & os, vtkIndent indent);
229 int GetHeaderIdentifier();
231 bool IsValidLSMFile();
235 int GetNumberOfTimePoints();
237 int GetNumberOfChannels();
241 int GetChannelColorComponent(
int,
int);
243 char * GetChannelName(
int);
245 void SetFileName(
const char *);
248 int RequestInformation (
249 vtkInformation * vtkNotUsed(request),
250 vtkInformationVector * *vtkNotUsed(inputVector),
251 vtkInformationVector * outputVector);
252 void SetUpdateTimePoint(
int);
254 void SetUpdateChannel(
int);
256 void SetDataByteOrderToBigEndian();
258 void SetDataByteOrderToLittleEndian();
260 void SetDataByteOrder(
int);
262 int GetDataByteOrder();
264 const char * GetDataByteOrderAsString();
268 vtkSetMacro(SwapBytes,
int);
270 vtkBooleanMacro(SwapBytes,
int);
272 int GetDataTypeForChannel(
unsigned int channel);
274 vtkGetStringMacro(Objective);
275 vtkGetStringMacro(Description);
277 vtkGetStringMacro(FileName);
278 vtkGetVector3Macro(VoxelSizes,
double);
279 vtkGetVectorMacro(Dimensions,
int, 5);
280 vtkGetVectorMacro(NumberOfIntensityValues,
int, 4);
281 vtkGetVectorMacro(DataSpacing,
double, 3);
282 vtkGetMacro(Identifier,
unsigned short);
283 vtkGetMacro(NewSubFileType,
unsigned int);
284 vtkGetMacro(Compression,
unsigned int);
285 vtkGetMacro(SamplesPerPixel,
unsigned int);
286 vtkGetMacro(ScanType,
unsigned short);
287 vtkGetMacro(DataType,
int);
288 vtkGetMacro(TimeInterval,
double);
289 vtkGetObjectMacro(TimeStampInformation, vtkDoubleArray);
290 vtkGetObjectMacro(ChannelColors, vtkIntArray);
291 vtkGetObjectMacro(TrackWavelengths, vtkDoubleArray);
292 unsigned int GetUpdateChannel();
294 vtkImageData * GetTimePointOutput(
int,
int);
301 int TIFF_BYTES(
unsigned short);
303 int BYTES_BY_DATA_TYPE(
int);
305 void ClearFileName();
309 unsigned long ReadImageDirectory(ifstream *,
unsigned long);
311 int AllocateChannelNames(
int);
313 int SetChannelName(
const char *,
int);
315 int ClearChannelNames();
317 int FindChannelNameStart(
const char *,
int);
319 int ReadChannelName(
const char *,
int,
char *);
321 int ReadChannelDataTypes(ifstream *,
unsigned long);
323 int ReadChannelColorsAndNames(ifstream *,
unsigned long);
325 int ReadTimeStampInformation(ifstream *,
unsigned long);
327 int ReadLSMSpecificInfo(ifstream *,
unsigned long);
329 int AnalyzeTag(ifstream *,
unsigned long);
331 int ReadScanInformation(ifstream *,
unsigned long);
333 int NeedToReadHeaderInformation();
335 void NeedToReadHeaderInformationOn();
337 void NeedToReadHeaderInformationOff();
339 unsigned long SeekFile(
unsigned long);
341 unsigned long GetOffsetToImage(
int,
int);
343 ifstream * GetFile();
345 int RequestUpdateExtent(
346 vtkInformation *request,
347 vtkInformationVector **inputVector,
348 vtkInformationVector *outputVector);
351 vtkInformation *vtkNotUsed(request),
352 vtkInformationVector **vtkNotUsed(inputVector),
353 vtkInformationVector *outputVector);
356 void CalculateExtentAndSpacing(
int extent[6],
double spacing[3]);
357 void DecodeHorizontalDifferencing(
unsigned char *,
int);
359 void DecodeHorizontalDifferencingUnsignedShort(
unsigned short *,
int);
361 void DecodeLZWCompression(
unsigned char *,
int);
363 void ConstructSliceOffsets();
365 unsigned long GetStripByteCount(
unsigned int timepoint,
unsigned int slice);
367 unsigned long GetSliceOffset(
unsigned int timepoint,
unsigned int slice);
383 double VoxelSizes[3];
397 int NumberOfIntensityValues[4];
399 int IntUpdateExtent[6];
412 double DataSpacing[3];
424 unsigned char CharPointerToUnsignedChar(
char *);
426 int CharPointerToInt(
char *);
428 unsigned int CharPointerToUnsignedInt(
char *);
430 short CharPointerToShort(
char *);
432 unsigned short CharPointerToUnsignedShort(
char *);
434 double CharPointerToDouble(
char *);
436 int ReadInt(ifstream *,
unsigned long &);
438 unsigned int ReadUnsignedInt(ifstream *,
unsigned long &);
440 short ReadShort(ifstream *,
unsigned long &);
442 unsigned short ReadUnsignedShort(ifstream *,
unsigned long &);
444 double ReadDouble(ifstream *,
unsigned long &);
446 std::streamsize ReadFile(ifstream *,
unsigned long &,
unsigned int,
char *,
bool swap =
false);
448 std::streamsize ReadData(ifstream *,
unsigned long &,
unsigned int,
char *);
unsigned short Identifier
vtkUnsignedIntArray * StripOffset
vtkDoubleArray * DetectorOffsetLastImage
vtkUnsignedIntArray * ChannelDataTypes
vtkIntArray * ChannelColors
virtual int GetSwapBytes()
unsigned short PlanarConfiguration
vtkDoubleArray * DetectorOffsetFirstImage
vtkUnsignedIntArray * StripByteCount
vtkDoubleArray * TimeStampInformation
unsigned long ChannelDataTypesOffset
vtkStringArray * LaserNames
unsigned long NumberOfLastAccessedImage
unsigned short PhotometricInterpretation
vtkDoubleArray * TrackWavelengths
vtkUnsignedLongArray * ImageOffsets
unsigned long ChannelInfoOffset
vtkUnsignedLongArray * ReadSizes
unsigned long ColorMapOffset
unsigned int NewSubFileType
vtkUnsignedShortArray * BitsPerSample
unsigned int LSMSpecificInfoOffset
int NumberOfScalarComponents
unsigned int SamplesPerPixel
const char * GetFileExtensions()
unsigned long OffsetToLastAccessedImage