File: Makefile

package info (click to toggle)
pixelmed-codec 20200328-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 432 kB
  • sloc: java: 2,855; makefile: 249; sh: 1
file content (117 lines) | stat: -rwxr-xr-x 4,414 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
OBJS = \
	EntropyCodedSegment.class \
	HuffmanTable.class \
	Markers.class \
	MarkerSegmentAPP0JFIF.class \
	MarkerSegmentDHT.class \
	MarkerSegmentDQT.class \
	MarkerSegmentSOF.class \
	MarkerSegmentSOS.class \
	Parse.class \
	QuantizationTable.class \
	Utilities.class \
	OutputArrayOrStream.class

all:	${OBJS}

PATHTOROOT = ../../../..

include ${PATHTOROOT}/Makefile.common.mk

clean:
	rm -f *~ *.class core *.bak

testparse:	${OBJS}
	rm -f /tmp/crap_copied.jpg
	rm -f /tmp/crap_source.jpg
	cp -v \
		"$${HOME}/Documents/Clients/MDDX/Experiment20130905/crap.jpg" \
		/tmp/crap_source.jpg
	java -Djava.awt.headless=true  -cp ${PATHTOROOT} com.pixelmed.codec.jpeg.Parse \
		/tmp/crap_source.jpg \
		/tmp/crap_copied.jpg
	# use make -i to continue to dump
	ls -l /tmp/crap_source.jpg
	ls -l /tmp/crap_copied.jpg
	hexdump -C /tmp/crap_source.jpg | tail -3
	hexdump -C /tmp/crap_copied.jpg | tail -3
	@echo "Comparing source and copied ... may fail with EOF if padding after EOI marker that is not copied, or missing EOI marker is added, both of which are OK"
	cmp /tmp/crap_source.jpg /tmp/crap_copied.jpg
	@echo "Finished comparing"

# without restart and working
		#"$${HOME}/Documents/Medical/compression/JPEG/10918-1/jpeg-6/testimg.jpg"
		#"${PATHTOROOT}/${PATHTOTESTFILESFROMROOT}/colorpngresavedfrompreview.jpg"
		#"${PATHTOROOT}/${PATHTOTESTFILESFROMROOT}/huff_simple0.jpg"
		#"$${HOME}/Documents/Clients/MDDX/Experiment20130905/crap.jpg"
		#"${PATHTOROOT}/${PATHTOTESTFILESFROMROOT}/smpte_8_q1.jpg"

# without restart and not working

# with restart and working
		#"$${HOME}/Pictures/Interesting/Me/clunie_737_cropped_close.jpg"
		#"${PATHTOROOT}/${PATHTOTESTFILESFROMROOT}/smpte_8_cjpeg_rst1.jpg"
		#"$${HOME}/Documents/Medical/compression/JPEG/10918-2/ITU T83/T83_process1/A1.JPG"

# with restart and not working

# premature EOF without EOI marker working (Heartlab)
		# dctoraw "/Volumes/Toshiba5TEnc/MDDX/20160928_CorruptionDuringMasking/dicom File.dcm" "/Volumes/Toshiba5TEnc/MDDX/20160928_CorruptionDuringMasking/dicom File.jpg"
		# "/Volumes/Toshiba5TEnc/MDDX/20160928_CorruptionDuringMasking/dicom File.jpg"

		# dctoraw "/Volumes/Toshiba5TEnc/MDDX/20170320_Assembla2719_MissingJPEGEOI/corruptedfile147652/corruptedfile147652/IM001(35)" "/Volumes/Toshiba5TEnc/MDDX/20170320_Assembla2719_MissingJPEGEOI/corruptedfile147652_IM001_35.jpg"
		# "/Volumes/Toshiba5TEnc/MDDX/20170320_Assembla2719_MissingJPEGEOI/corruptedfile147652_IM001_35.jpg"


testdecompress:	${OBJS}
	rm -f /tmp/crap_source.jpg
	rm -f /tmp/crap_decompressed*.raw
	cp -v \
		"$${HOME}/Documents/Medical/compression/JPEG/10918-2/ITU T83/T83_process14/O1.JPG" \
		/tmp/crap_source.jpg
	java -Djava.awt.headless=true  -cp ${PATHTOROOT} com.pixelmed.codec.jpeg.Parse \
		/tmp/crap_source.jpg \
		"" \
		/tmp/crap_decompressed.raw
	ls -l /tmp/crap_decompressed*.raw

		#"$${HOME}/Documents/Medical/compression/JPEG/10918-2/ITU T83/T83_process14/O1.JPG" \
		#"$${HOME}/Documents/Medical/compression/JPEG/10918-2/ITU T83/T83_process14/O2.JPG" \

testcannotdecompress:	${OBJS}
	rm -f /tmp/crap_source.jpg
	rm -f /tmp/crap_decompressed*.raw
	cp -v \
		"${PATHTOROOT}/${PATHTOTESTFILESFROMROOT}/smpte_8_q1.jpg" \
		/tmp/crap_source.jpg
	java -Djava.awt.headless=true  -cp ${PATHTOROOT} com.pixelmed.codec.jpeg.Parse \
		/tmp/crap_source.jpg \
		"" \
		/tmp/crap_decompressed.raw

testdecompressfromdicom:	${OBJS}
	rm -f /tmp/crap_source.dcm
	rm -f /tmp/crap_source.jpg
	rm -f /tmp/crap_decompressed*.raw
	cp -v \
		"$${HOME}/Pictures/Medical/JPEGVarious/z18" \
		/tmp/crap_source.dcm
	dctoraw \
		/tmp/crap_source.dcm \
		/tmp/crap_source.jpg
	java -Djava.awt.headless=true  -cp ${PATHTOROOT} com.pixelmed.codec.jpeg.Parse \
		/tmp/crap_source.jpg \
		"" \
		/tmp/crap_decompressed.raw
	ls -l /tmp/crap_decompressed*.raw
	rm -f /tmp/crap_source_dcunjpeg.*
	dcunjpeg /tmp/crap_source.dcm /tmp/crap_source_dcunjpeg_little.dcm
	dccp -endian big -vr explicit /tmp/crap_source_dcunjpeg_little.dcm /tmp/crap_source_dcunjpeg_big.dcm
	dctoraw /tmp/crap_source_dcunjpeg_big.dcm /tmp/crap_source_dcunjpeg.raw
	@echo "Comparing decompressed with pixelmed codec and decompressed with whatever codec dcunjpeg uses"
	cmp /tmp/crap_decompressed.raw /tmp/crap_source_dcunjpeg.raw
	@echo "Finished comparing"
	hexdump -C /tmp/crap_decompressed.raw | head -3
	hexdump -C /tmp/crap_source_dcunjpeg.raw | head -3

		# "$${HOME}/Pictures/Medical/JPEGVarious/z18"